Pong Game

As part of my college course at Suffolk New College, for the computer games unit we did, I  needed to practice creating games and getting used to the interface of Adobe Professional CS4 and gain knowledge of the ActionScript 3.0 programming language. So to help me my tutor gave me and the rest of the class sample code that could create complete games, which we could then add our own enhancements to if we wished to do so.

The first game I created was a ping pong game, simply called Pong. It is a two player game, where you have the move the bats up and down to hit the ball, and if the ball is missed the other players score increases.  I made a few enhancements to the original code, allowing the game to be restarted via a button, added music, which can be turned on and off also via a button and in-game messages.

Improvements – August 2012

This month I have been working to improve this game. Now when the ball hits either the left or right back, both the ball and the bat that was hit will change to the colour red to show that the ball has hit the bat. Also I have fixed an issue with the reset button so now not only does the ball reset into its proper starting position, but so do the bats. When the game is started the title of the game appears along with the press space to start message. Also I have fixed the bug with the music which would restart twice when the reset button was clicked.

There will be further modifications to this game in the future.

To play the game click once on the game with the mouse and then press the space bar. The left bat is controlled via the A (move up) and Z (move down) keys. The right bat is controlled via the k (move up) and m (move down) keys. The game ends when one of the players’ gets a score of 21.

Please click here to play the game!

Please note: I do not own the sound effects and music used in this game.