Thursday, March 27, 2008

Circular Pong Game Returns


In 1999 I was playing around with Java 2D and I was looking for an excuse to try out gradients, anti-aliasing, alpha blending and the like. So I decided to write a simple pong-style game. But not the kind with paddles that move up and down. This game would have a single paddle that goes around a circle.

So I created C-Pong. It was a good demonstration of my Java Swing skills circa 1999. All the text was loaded from a properties file so it could be translated into other languages. All the UI controls had nice tooltip text messages. It was even fun to play for a little while.

When I abandoned the project in 2000, I was working on a networked version of the game, where people over the net would each have a paddle (of different colors). I hadn't worked out the interesting bits (like latency).

Later I started working on S-Pong, where you moved your paddle around the surface of a sphere, but the time wasn't right for fast 3D Java performance.

Recently I ran across my C-Pong source code and thought that people might find it amusing. So I did a little cleanup and refactoring, and committed it to my Subversion repository at SourceForge.net.

I was using IBM VisualAge for Java at the time, so for someone used to a modern GUI builder, the code will look very strange. Perhaps I (or someone) will convert the GUI code to something modern. Today I write lovely doc comments for my Java code (especially code that people pay me to write), but you won't find any in C-Pong, I'm sorry to say.

You'll find C-Pong on davebsoft.com, ready for you to launch with Java Web Start, along with the source code which you can browse or fetch from Subversion.

0 comments: