Project 2
CS 320
100 points, due May. 1, 2000
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.
Your program is due at the beginning of class. Once again, place all files
into a folder within your class folder
(\\ phoenix\). The 5% per day for five days late penalty
will be used again.
Thomas P. Kelliher
Mon Apr 17 10:07:53 EDT 2000
Tom Kelliher