Final project and interactivity

i chose to write a simple pong game in p5 where you would have to use the paddle to keep the ball suspended in the air for as long as possible. Each correct deflection of the ball without the ball touching the ground will score a point. The user will control the paddle at the bottom of the screen with the left and right arrow keys on their keyboard.

I had some troubles with this project and i would also like to add more to this project. For instance i would like to add a highscore counter where the user can submit their score when the game was over.

I am not sure how to code a piece where if the ball fell to the bottom of the canvas and the user was not able to deflect the ball with the paddle, then the game would say “game over” and the user had to press a key to start the game again.

I would like to explore this game more and add more levels possible where two or more balls are dropped and the user can use a “power up” where they are given a bigger paddle to use or they can choose another power up which gives the player two or more paddles to use. The possibilities and increase in difficulty seem endless. However it was a simple but direct project.

https://editor.p5js.org/Aphill18/sketches/5IpZR8yWo

Leave a comment

Design a site like this with WordPress.com
Get started