Pong in OpenGL


Project   GWU CS185 2004 Project 1: Pong
Instructor   Dr. James K. Hahn
Assistant   Sang-Joon Lee
Code written by   Grace E. Cho
Documentation written by   Grace E. Cho
Created in   October 2004

Implementation Methods

The source code is written in C++ using OpenGL and compiled by VC++ 6.0.

These are represented as classes PongBall, PongPaddle, and PongWall, respectively. Each of these classes are derived from an abstract class called PongObject. PongObject class provides basic functions to set and retrieve position of the object and its color. The virtual function Draw() is to be implemented in a derived class.

Graphically Speaking

Basic Functionalities

Enhencement

How To Play

The default intial position of the ball in on the left of the play field and in the half way in the y direction. The paddle is located on the right and in the half way in the y direction, like the ball. The initial tractory of the ball is set to 15 degrees.

To change the initial values, start the game in the commond prompt by entering:
gec_pong [ball x position] [ball y position] [ball trajectory] [paddle y position]

The paddle moves when the mouse is pressed on the paddle and moves up and down. It does not move horizontally unless the level changes.

List of Key Commands
`s' Start a game session
`r' Restart a game
`ESC' Quit Pong
Number 1 to 9 Change level

Remarks:

Play Pong!


Last update: Oct 7, 2004

Questions and comments to Grace E. Cho

Hosted by www.Geocities.ws

1