Papers 06 May 2003 06:00 am
So you want to begin making games, maybe you already started on one, maybe you and a few friends decided to try being a studio. Think you got what it takes? Of course you do, or at least you can learn fast enough during the process. I think you are wrong, or at least misinformed. Making games takes experience, discipline, dedication, know-how, and a driving idea and/or boss.How can you get that experience and discipline needed to tackle any game for years to come? I believe I have the perfect solution. Some may laugh, others may doubt, but here it is: Make Pong.
This is where you go “Eeewww…nono, we want 3D, massive worlds, immersive sound, latest-and-greatest features!” But seriously, why not try to see if you can do Pong? Such a simple game can’t take more than a day to make; maybe two days if you only work on it in your spare time – more like a month, I say. You may even use 3D and immersive sound.
Are you up for the challenge?
Bring It On!
Pong. 2 pads and a ball. 2D playing field, player pads on the left and right side, boundaries on the upper and lower edges, with the ball bouncing around inside. Nothing fancy, nothing revolutionary, but it has everything modern games have.
- The Rundown
- Core Components
- Game Logic
- Controller Input
- User Interface
- Single-Player Mode
- Computer AI
- Multi-Player Mode
- Peer-2-Peer and/or Server-Client
- Multiple/Shared Input Devices
Oh my, suddenly the innocent Pong looks quite complicated. Allow me to elaborate…
Core Components: Game Logic
The game logic is the basic ruleset. We have 2 players, meaning one will win and one will lose. Points are gained by shooting the ball beyond the opponents pad. A simple rule such as “first to reach 10 points wins” will do. If you want to further complicate the game you can add (moving) obstables to the playing field, or perhaps bonuses.
Core Components: Graphics
Good old 2D will be more than adequate, yet it won’t hurt to render the playing field in 3D just to get to know 3D graphics APIs. Could also have fancy particle effects follow the ball.
Core Components: Sound
Play me a fanfare when I win and a *doink* when the ball bounces. This is probably the part most would say can be skipped. I admit it’s a small part of Pong, but whaf if I would like to have the *doink* play on my left speaker when it bounces on the left side of the screen?
Core Components: Controller Input
Joystick, mouse, or keyboard? All three at once? One thing is for sure, this is the easy part. You only need to worry about one axis with a joystick or the mouse, and two buttons with the keyboard. The challenge here is to find a good balance between movement in hand and movement on screen.
Core Components: Physics
You’ll need to deal with velocity in 2 dimensions, and physics regarding bouncing. 2D velocity can be expressed using vectors. Bouncing can seem trivial at first, but to make the game fun you could have the ball bounce differently on the edges of the pad as opposed to a clean bounce on the middle. The ball could also speed up more and more as the game progresses.
Core Components: User Interface
The UI has strong ties to Graphics and Controller Input, alongside a weaker tie to Sound. It’s all about showing the menu, presenting the player with his current score, having text input fields for high-score rankings, so on so forth…not the most exciting part, but must be done. A game is not finished until it has a proper UI!
Single-Player Mode: Computer AI
One could argue how much AI applies to Pong. However, the computer player should be a variable opponent; meaning difficulty levels. An easy computer could just move the pad to where the ball is right now, while a smarter computer would attempt to predict where the ball will be. Further subdivions of difficulty levels could affect the speed at which the computer moves the pad. The ultimate computer AI will adjust itself to always be a challenge throughout the game.
Multi-Player Mode: Peer-2-Peer and/or Server-Client
A good chance to use sockets, make up for lag, and learning what to actually send over a remote connection. The old issue of whether to use P2P or Client/Server also shows up, alongside how to combat cheating.
Multi-Player Mode: Multiple/Shared Input Devices
Two players on one computer. You probably know what Multiple Input Devices are from console fighting games. On a PC it’s hardly fair for one to have the mouse and another to use the keyboard. Thus you might want to implement Shared Input Devices, in this case sharing the keyboard.
Well, there it is. The good old game Pong can be quite a challenge, and certainly not something you finish in a day or two. And this is exactly the reason I believe Pong is the perfect game to test your skills as an all-round developer and/or studio. It’s not overly ambitious, yet it requires a good amount of discipline. Look at it this way: If you can’t finish a simple game of Pong, do you truly think you are ready for the big games?