Android Pong Game

Workshop Pong Game

The first computer game I ever played was Pong, running on a Datapoint 2200 computer.  The machine had a screen with 12 lines of 80 columns each.  The paddle was three left brackets and the ball was an asterisk, since this was long before graphical screeens.  Motion was controlled by two special keys on the keyboard.

Fast-forward to June, 2016.  I started this game as a class project for an Android workshop at UTD.  I would write part of it at home, then part of it in class, showing various aspects of Android programming.  In particular, the concepts I wanted to show were animation, drawing, using multiple threads, event-driven programming, and how to place various controls using the LinearLayout.  Thus it doesn't look all that modern because I never changed it to, say, RelativeLayout or ConstraintLayout, which would look better, because those layouts didn't exist when I wrote it.  I also wrote it before there were fragments, although the top part of the screen should be one.

The program follows good object-oriented design, in that there are a total of 13 classes.  For example, file I/O for settings and high scores is a singleton.  The ball and paddle are both objects that know how to draw themselves.  And so on.  There are five Activities, one for each screen.

You can download it by going to the Google Play Store and doing a search on "John Cole Pong."

Main Pong screen High Scores Two-player screen