Describe AdamCohen/Assignment 1 Writeup here.


This program is a homeless man's PacMan. When you run the program, pacman will start moving upwards along the path. You can control his movement with the arrow keys. It's a solid 8 seconds of fun. Enjoy.


Pacman is drawn with an open_circle function which draws a circle with a variable width 'slice' chopped out in an arbitrary direction. Pacman has a static _direction field associated with it. With every clock tick, he moves a bit in that direction. When he is drawn, the open slice also faces in that direction. The size of the slice is also a static member and changes with every tick to make his mouth go open and shut. The path is just a few rectangles.

User input is very simple. glutSpecialFunc(arrows) defines that the action of the arrow keys is to simply change pacman's direction field to 0, 90, 180, or 270, depending on the button.

1) There are a number of events which trigger event functions that are

2) In this case, it specifies that we are in RGBA mode as well

3) glOrtho(), according to man, multiplies the coordinate system

last edited 2007-01-18 09:29:57 by slater