Introduction

 

Since I've been alive, I've been a gamer. For just about as long, I've been interested in game design, but I've never had the time, resources, or experience to dive in to making a real game. I'm glad to have had this opportunity to start working with computer graphics and to use those tools for creating an actual interactive experience. I decided to make a new, 3D version of Pong for my final 471 project. Implementing the basics of Pong isn't too difficult, but it spans a number of basic areas (like user control, artificial intelligence, scoring, vector math, and collision detection) and allows for a lot of tweaking, customization, and creativity.

Gameplay

 

The controls for Pong 3D are made up of clicks and mouse movements. To start playing at the start of the game or after a scored point, simply click the mouse, and the ball will be launched at you. Move the mouse back and forth to move your game paddle. Note that by moving the paddle while hitting the ball gives it some spin, and the ball's trajectory will change. This is important for beating the computer!

The goal is to get through three levels. There is a progress bar above the game area to indicate how close or far away a win is. By getting the ball past the computer's paddle, you move to the next level, where the ball speed increases, and the computer becomes a more challenging opponent. Inversely, if the ball gets passed you, you drop down a level, and the game eases up. Upon beating the third and final level, you can restart the game and return to the first level to play again. See how fast you can get through all three levels! A lot of time went into balancing the exact gameplay speed and difficulty to make it not only playable, but fun and challenging.

You can pause the game, if necessary, by pressing P.

Graphics

 

The basics, graphically, are as follows:

  • Models are made up of spheroids and cuboids
  • The scene is Phong shaded
  • The objects are made of different materials
  • Animations come from model transforms

In addition to the basic scene setup and gameplay movement, the ball hitting a paddle creates a small, shockwave-like particle effect, where a ring of spheroids emanate out from where the collision occurred and then shrink away (as seen above). If the ball gets past a paddle, it explodes into a radiating sphere of particles. After changing levels, the ball reappears in the center of the gameplay area by growing from nothing back to its normal size. The scene's light moves around some to make the visuals a bit more dynamic. Lastly, the camera sways subtlety back and forth, keeping track of the ball's horizontal position.

References