"… build a version of Pong, one of the first arcade video games (1972)"

Project Portfolio:
  Pong in Python

Challenge

The challenge of this project was to build a version of Pong, one of the first arcade video games (1972), using the software programing language Python.  This project was a project for the Rice University Computer Science class “Introduction to Interactive Programing in Python”, offered through Coursera, an online education site.  The class is part of a series of classes designed to develop an understanding of computing fundamentals.

Solution

To take this class and do the project I signed an agreement that stated the actual code would not be shared.  Therefore, I have not posted the Python code solution online.  A foundation framework was already in place that took care of the environment to display the graphics and the window on which the game would be played.


Some of the solutions that needed to be developed to implement Pong in Python successfully included:

  • Code that properly accounted for the ball’s movements when it collided with the walls, with the paddles and with the ‘gutter’ (where you score a point).
  • Code that drew the right and left paddles and moved them in an appropriate manner (up & down only, within a specific area).
  • Code that allowed the “w" and "s" keys to control the vertical velocity of the left paddle and that allowed the "Up arrow" and "Down arrow" key to control the vertical velocity of the right paddle.
  • Code that adds scoring to the game each time the ball struck the left or right gutter.
  • Code that moderately increased the velocity of the ball as the game progressed.
  • Code that added buttons to reset and to restart the game and to also reset the score.

Results

The Python based project was challenging to develop.  The implementation was successful and passed all the required test but it was also fun to play with.