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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started