Assignment 4 (Final): Bringing it all together

Assignment 4
Due by Final Exam time: Thu, Dec 12.


In this assignment you will apply what you've learned of basic OpenGL and GLSL to build a simple game.
Our suggested game is a 3D version of Pac Man. If you are not familiar with the game, you can play it online here, view some historic here, and find more information about the game at its Wikipedia entry here. There are also many other sources online.
If you would rather implement a different game, you may do so, providing you obtain instructor's approval before you start. To obtain that approval, send an email with a short description of your proposed game (remember to include "461" in the subject line).


The components of this assignment will be graded as follows:
  • 5% Properly turned in assignment
  • 25% Create the field. Each playing field in Pac Man is a 3-D field, similar to the 2-D field in classic Pac Man, except that we have 3-D walls. Position your camera on top of the field at an angle, so that the entire field is visible. Take a look here and here to understand how your 3-D field should be created and positioned. Unlike the second video, camera should be kept stationary and you don't need to follow Pac Man as he moves through the field. Extra credit for moving the camera with Pac Man (see below).
  • 25% Create Pac Man. A simple sphere will do. Make sure it can move back and forth between the edges using keyboard or other input. You need to create only one life. Extra credit for multiple lives (see below).
  • 15% Create an enemy. Any 3-D shape or color different from the player will do. The enemy should appear at a the center of the field, and after bouncing for a pre-defined number of times, should exit the center and autonomously move through the field. You may pre-program the movement of the enemy through the field. Extra credit for random movement (see below).
  • 10% Create 3 additional enemies (total 4 enemies). Create 3 more enemies, with different colors and similar properties as above.
  • 10% Enable Pac Man eating. When Pac Man moves, he eats a "dot" in his path. Once a "dot" is eaten, it disappears from the field. Once all dots are eaten, the game ends (or moves to a different level - Extra credit, see below).
  • 10% Enable Pac Man dying. When Pac Man encounters an enemy, Pac Man dies with animation. The game ends if all lives are exhausted, else Pac Man spawns again from a pre-specified point.
  • Participation credit: You can receive participation credit (outside of this assignment) for posting your resulting imagery and video, good or bad, on the class forum!

General notes:

Group projects are allowed, but groups of n people will be expected to implement almost n times as much work! Since this will necessarily involve a different game than the simple one described here, you must again obtain approval for any such group project via email. Since variation here is encouraged, please make sure to include a readme file.


Extra credit opportunities include the following, with others possible with instructor approval:
  • 5% Pan Camera with Pac Man. As Pac Man moves, follow his movement using camera. Obviously, this will cause clipping of the scene. See here for example.
  • 5% Multiple lives. More than one life for Pac Man. Show the number of remaining lives on top-left.
  • 5% Event Sound. On certain game events, e.g. game start, Pac Man movement, Pac Man eating, Pac Man dying, etc.
  • 5% Background Sound. A sound plays during the game play in background.
  • 5% Random movement of enemy through the field. Instead of moving in a pre-defined pattern, the enemies now randomly move through the arena. You can implement any path finding algorithm for this purpose.
  • 5% Multiple levels. When all dots are eaten, a different field is presented to the player.
  • 5% Level transitions. Between levels, there is a cool animated transition to the new level.
  • 5% Enable Pac Man revenge. Occassionally Pac Man eats big shiny dots in his path, which temporarily turn enemies "blue". While enemies are blue, if Pac Man encounters them, Pac Man can eat enemy. The enemy dies and respawns as "normal" from the center.
  • 5% Enable Scoring. You can choose any scoring scale you want. Display the score on top-right of the screen.
  • 10% Use GLSL for rendernig and shading.