This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Pong!
Kalyn D.
Patrick H.

We chose to modify the program called Collision. In the original Collision program there was one paddle on the right side of the screen that would hit a ball and make it bounce back and forth. If the paddle missed the ball it would go off the screen and eventually return back on the left side again. The first change we made was the title. The title is now called Pong, because it is similar to the original pong game. The direction of the speed of the ball was too slow so we changed it from 0 to 1. A second paddle had to be created, so we copy and pasted the code for the right paddle, but put an L behind the width, height and wall distance. Now there are two paddles on the screen but both paddles were being controlled to move up and down with the movement of the computer mouse. We decided we wanted the right paddle to move with the mouse and the left one to move whenever two certain keys on the keyboard were pressed. The code for this was found under the help reference area. We chose the key ‘S’ and ‘X’. S moves the paddle up and X moves the paddle down. We also shortened both paddles from the size of 60 to size 40 to make the game more challenging. The background color used to be dark grey and is now lime green, and the paddle used to be light grey and is now black. Finally, the last change we made was that we copied and pasted the original constrain and put an L on the second code so that the ball would stay in range of the screen. After all these changes we were finally able to play an actual functioning video game, thus pong was born!

Source code: pong__program

Built with Processing