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:

  1. Good coding and design:
    1. Modularity. Short functions.

    2. Symbolic constants. No hard-coded constants.

    3. 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.

  2. A menu so that the player can increase the skill level, quit, restart, and change the color of the ball(s).

  3. A skill-level which increases over time. Document how you modeled this.

  4. 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.

  5. An on-window non-flickering score.

  6. Use viewports for the game portion of the window and the scoreboard portion of the window.

  7. Only clear the entire window or viewport when absolutely necessary. E.g., blank the previous ball position rather than the entire viewport.

  8. 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:
  1. Use a wireframe representation for the ball and implement rotation. Document how you modeled rotation.

  2. Use mouse motion (see the man page for mousemotionfunc) rather than the arrow keys to control the paddle.

  3. Introduce multiple balls. Modeling off-center collisions will require some thought.

  4. Use ``Breakout''-style bricks.

  5. 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