Project 2
CS 320
75 points, due Mar. 31, 2003
Using the pong starting point code I gave you, finish the program. Your
program should have the following features:
- Good coding and design:
- Modularity. Short functions.
- Symbolic constants. No hard-coded constants.
- Documentation: meaningful (to someone other than yourself)
identifier names and comment if necessary, a brief explanation for each
function, and an explanation of overall program features.
- A menu so that the player can increase the skill level, quit,
restart, and change the color of the ball(s).
- A skill-level which increases over time. Document how you modeled
this.
- Model the face of the paddle as a curved surface, penalizing with
increasing distance from the ``sweet spot'' and rewarding for hitting with
the sweet spot.
- An on-window non-flickering score.
- Use viewports for the game portion of the window and the scoreboard
portion of the window.
- Only clear the entire window or viewport when absolutely necessary.
E.g., blank the previous ball position rather than the entire viewport.
- Occasionally randomize the reflection off the paddle's sweet spot so
that the player can't simply maneuver the ball's trajectory in such a way
that they can leave the paddle motionless.
In addition, implement any two of the following:
- Use a wireframe representation for the ball and implement rotation.
Document how you modeled rotation.
- Use mouse motion (see the man page for
mousemotionfunc
) rather
than the arrow keys to control the paddle.
- Introduce multiple balls. Modeling off-center collisions will
require some thought.
- Use ``Breakout''-style bricks.
- Use
gluttimerfunc
so that your game runs at the same speed on
PCs of various speeds.
I am willing to consider other features with which to augment this list.
Once again, e-mail appropriate files as attachments to a single e-mail to
Send mail to kelliher AT DOMAIN goucher.edu.
Thomas P. Kelliher
Fri Mar 7 11:54:08 EST 2003
Tom Kelliher