TroyDev

Pong - A take on the classic arcade game.

This project is based on the classic arcade game PONG and came about as a 1 hour programming challenge. I completed the challenge with a working version of the game however with all my projects I immediately wanted to improve on it. Unfortunately I did not save a copy of the original version however the oldest version documented is very close in looks, if not source code.

Try it yourself: Pong.jar

Source code (MIT License): Github

View Image View Image
  • Three AI settings.
  • Local Multiplayer.

Help

If you are having trouble running the program, please try this quick guide.

What Am I Looking At?

For those of you who haven't played PONG before, the idea is to stop the ball from hitting your side of the screen. You do this by moving a paddle on your side to intercept the ball, causing it to bounce back towards your opponent.

The Interface

  • To Exit: Press the escape key on your keyboard.
  • To Pause: Press the 'p' on your keyboard.
  • Toggle AI ~ [difficulty]: Click on these to swap between a human or AI players.
  • Reset Scores: This sets all scores to zero, it does not reset the ball position.

Player One:

  • Up: 'w' key
  • Down: 's' Key

Player Two:

  • Up: Up Arrow Key
  • Down: Down Arrow Key

Devlopment Log

~ Future Plans ~

I'm intending to re add the visual effects lost from the previous version. I'm also hoping to re-engineer the AI, perhaps utilising a neural net.

The new version will likely be in a language other than Java, perhaps javascript so it can be played online.

~ September 2012 ~

A very simple first version of the program. It was written for an older version of the TCode library therefore some of the motion effects are lost, due to changes in frame rate monitoring and control.

The AI is fairly simple and follows the ball back and forth, however it isn't perfect. Over time small random mutations to it's alignment add up to a miss. There is a small chance for alignment to be fixed, it is the size of this chance which governs the difficulty of the AI.

Try it yourself: Pong.jar

View Image

Features of this version:

  • Three AI settings.
  • Local Multiplayer.