Design and implement a simple video game in Processing.
Project Details:
Design and implement a video game in which the user uses the mouse or keyboard to control an animated character and avoid an enemy. The program should keep track of the score by counting the number of frames in which the creature was displayed.
If the character collides with the enemy, it should lose a life. When the character loses all its lives, it should disappear from the screen, and the Processing message window should read “Game Over”, followed by the final score.
Program requirements:
• The program should handle display and movement for the two characters.
• The enemy should start in a random location and move at a constant speed bouncing off walls.
• The player’s character may start in any position that you define (center, corner, random, etc.), and move as dictated by the mouse or keyboard. It should not fall off the screen.
• Collisions between the character controlled by the player and the enemy should be treated as described above.