In this project, we will build a version of
Pong , one of the first arcade video games (1972). While Pong is not particularly exciting compared to today's video games, Pong is relatively simple to build and provides a nice opportunity to work on the skills that you will need to build a game like
Asteroids . As usual, we have provided a
program template that can be used to guide your development of Pong.
Mini-project development process
Add code to the program template that draws a ball moving across the Pong table. We recommend that you add the positional update for the ball to the draw handler as shown in the second part of the "Motion" video.
Add code to the function ball_init that spawns a ball in the middle of the table and assigns the ball a fixed velocity (for now). Ignore the parameter right for now.
Add a call to ball_init in the function new_game which starts a game of Pong. Then add a call to new_game in the main body of your program.
Modify your code such that the ball collides with and bounces off of the top and bottom walls. Experiment with different hard-coded initial velocities to test your code.