glpong
Nostalgia aside, this is the 21st century and we do have fancy three-dimensional game engines to make our game play more interesting. There is absolutely no reason not to drag pong along with us into 2002. Eric Greenwald's glpong (see Figure 1) attempts to do just that . . . while keeping true to the spirit of simplicity I just told you about. Start by visiting his site at http://math.smsu.edu/~erik/files/ and get yourself the latest source.
Figure 1 Entering the third dimension with glpong.
Building and running glpong does require a 3D accelerated video card, OpenGL or Mesa, and the SDL libraries. To get things up and running, use the standard extract, configure, and make process:
tar -xzvf glpong-1.0.tar.gz cd glpong-1.0 ./configure make
Play is simple and takes place against the computer. Use your cursor keys to move the paddle left and right. It doesn't get any easier than that.
3Dpong
For true 3D realism, you have to search through your junk drawer and pull out those blue and red 3D glasses you've been keeping. That's because our next incarnation of pong includes a 3D glasses 3D mode that you can toggle on the fly. For even more nostalgia, Bill Kendrick's 3Dpong features vector based graphics (see Figure 2). Throw in network play and you've got the start of something great not to mention surprisingly addictive. You can get 3DPong by visiting New Breed Software's website at www.newbreedsoftware.com/3dpong and picking up the latest source.
Figure 2 Get out those 3D glasses!
Now, extract the source, build and install the program:
tar -xzvf 3dpong-0.4.tar.gz cd 3dpong-0.4 make cp 3dpong /usr/local/bin
To play a single player game, type the following command:
3dpong $DISPLAY computer
You serve the ball with the right mouse button. To move your paddle, hold down the left mouse button and move your mouse. You can cycle through different views as you play by pressing the "v" on your keyboard. You can play from the vantage of your own side of the court, the bleachers, or directly above. In fact, your viewpoint can be from anywhere at all.
3DPong also has a free view that allows you to rotate the court 360 degrees in any direction. Just hold the middle mouse button and drag it to suit your level of challenge. Of course, if you are using a two-button mouse and emulating three buttons, simply press both buttons simultaneously. Incidentally, if you think the computer has an unfair advantage in the game, simply leave off the word "computer" in the above command and 3DPong becomes a handball game.
... Yes, I did mention network play. Every once in a while, you need to square off against another intelligence like your own. Here's what you do. Start one game on your machine like this:
3dpong $DISPLAY theirsystem:0.0
Similarly, your friend will do the same thing but with your host name specified. The game is on!
wmpong
To wrap up today's article, let me introduce you to a little tiny program called wmpong (see Figure 3). As the author, Dag Wieers, points out in the accompanying documentation, the program has no useful purpose. That's okay, Dag, I still like it. wmpong is a WindowMaker application. Specifically, it is what is called a "dock app," a program that docks into WindowMaker's dock. That little 64x64 pixel image to the right is wmpong in action you can get your copy at www.bensinclair.com/dockapp/wmpong-0.3.tar.gz. That file, by the way, resides on Ben Sinclair's Dock App Warehouse, a great place to explore when looking for WindowMaker dock apps.
Figure 3 Tiny wmpong.
To build wmpong, follow these steps:
tar -xvzf wmpong-*.tar.gz cd wmpong.app/wmpong make make install
There's actually a wmpong.h file in the directory that you can easily edit to change the ball thickness as well as the maximum number of balls on screen at any given time. When you start the program by typing "wmpong &", you'll notice a plus and minus sign button. These will increase and decrease the number of balls bouncing around in the little window. The "R" button to the far right will relaunch the balls (should you get bored with the current bounce pattern).