Question: Write the p5 code for the following project: Create a game that kills bugs whenever you click on them. Have 2 sprites, one that represents

Write the p5 code for the following project:

Create a game that "kills" bugs whenever you click on them. Have 2 sprites, one that represents a bug and one that represents a dead bug after it's "killed". Each game consists of 30 seconds, have the timer counting down to the nearest second and show the score and update it as the user kills each bug. Prompt the user to click any button to start the game and begin the timer.

Have the bugs move left and right and change direction randomly. As the user kills each bug, increase the speed of the bugs movement, making it more difficult.

When the game is over, show the text "Game Over!" and then refresh to show "Click any button to start the game" to start a new game.

Please write this code, I have the sprites for the bugs and dead bugs so I just need the code to complete this project.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!