PONGolympiX

by robertmahend15 in Circuits > Electronics

227 Views, 2 Favorites, 0 Comments

PONGolympiX

2.png
10.png
11.png

The name of this game is PONGolympiX, it is just the game PONG. I have made this game before but I did not learn about classes and how well I can use function and other functionalities on Processing 3. To make this game we basically have to first plan it out and know what are the different classes that you may need to make this game.

Supplies

Processing 3

Notebook

Classes

6.png
1.png
7.png
8.png
2.png

After I figured out how many classes and functions, I can first make the classes: Players, ball and buttons. For the players and call class I have some of the same function(render(), move(), resetboundaries()). I included the collision detection inside of the players class and the ball class has a bounce() function to make sure it bounce of the bottom and top of the screen. The button class is pretty cool, it uses the mousse position to make the button kind of light up; clicking on the different button will take you to different screen.

Declare, Initialize - MAKE a GREAT GAME

9.png

First, we can declare all of the variables that we will use; then we initialize them and we can start making a game. I used a switch time to set up my game, since I will have different screen for the game it made since to do that and just call different functions.

THE GAME

5.png
4.png
2.png
3.png

The buttons can take you to different screens, made an instruction page to just give some inside into my game. First to 7 wins and then there is a winning screen at the end.

Enjoy the game.