C.L.U.^3
Michael Sego and Kirk Shimano
Combustible Lagomorphic Unit
Contest Website: www.clu3game.com
(also at www.stanford.edu/~mikelain/clu3)

In this directory you will find the source, the executable, the Makefile,
all our textures, sound files, and data files. Run the program by typing CLU3.i386-linux

Our game is an arcade-style game which drew inspiration from the 1983
Nintendo game Clu Clu Land. In this game, you are a bunny on rocket
stakes, constantly moving forward. To turn, you can reach out your arm and
grab on to a pole. You will swing around the pole until you release your
arm. Your goal is to collect all the hidden gems... you "discover" a gem
when you pass over it's location, and the gem will then become visible. If
you hit a wall, you will turn around and go the opposite
direction. If you fall in a sprial vortex and are not currently holding on
to a pole, you will die. You will also die if you hit a robot. However,
you can temporarly stun the robots with your gun (you will know a robot is
stunned because it will no longer move forward, it will flail it's arms
wildly, and it will be blinking on the heads-up-display.) The game ends
when you lose three lives. The game also includes multi-player split
screen, so you can compete with others to see who can collect more
gems. Your "life meter" is constantly going down slowly, but will also go
down if you are shot by a robot, or shot by another bunny... or if you
shoot your gun into an elastic band and the shot bounces back and hits you
(elastic bands are also hidden around the world... if you discover one, it
will bounce you back every time you hit it.)

NOTE: For optimal viewing conditions, play the game in the "Supersized"
world with one player. Although everything was working properly before the
competition, we suddenly started getting new errors during our contest 
finalist demo that had never showed up before... 

ADVANCED FEATURES:
Below are the time-consuming "special features" we implemented to make our
whole Bunny World feel more alive.

Animation System: We implemented our own key-frame interpolation system without the aid of any pre-packaged commercial programs. In our system, each key frame specifies an orientation and position for each of the character's joints.  For instance, the part of a key frame which determines a bunny's head specifies how far the head should be located from the base of the bunny's neck, as well as the head's rotation about the X,Y, and Z axis. Interpolating along these joints provides for very fluid, natural animation. Every single character action was animated in this fashion - from the rodents' push-ups to the bunnies' wall flips to the robots constant arm swinging.

PARTICLE SYSTEM: The fire used to explode each bunny, the sparks that trail the bunnies' rocket shoes, the smoke that issues when these sparks hit the ground, and the steam from the teapot in the opening story scene are all products of the same basic particle system. A particle list ADT spawns a number of particles at a time-dependent rate, giving each its own initial mass and starting position. As each particle jets forward, it is pulled by a constant gravitational force, eventually eliminating itself when a specific boundary condition is met. Each particle is drawn as a billboarded quad with a semi-transparent texture. The firing rate, initial velocities, gravitational force, and boundary conditions of each specific particle system were tweaked to different values in order to achieve each desired effect.

SIMULATED DYNAMICS: Each of the elastic bands in our world are represented by a NURB whose control points are governed by the rules of simple damped harmonic oscillation.

Sound: In the story sequence you can hear the story unfold with sounds
timed perfectly to the characters actions. Likewise, during the game there
is heart-thumping music and sounds to go along with the action.

Collision Detection: Collision detection in this game is simple, but very
quick and precise. If an object's currently speed and direction will cause
it to collide with another object's bounding volume during the next update
cycle, a collision response occurs. You'll notice how if the sparks from
his rocket shoes hit the wall, they become smoke particles. Gunshots that
hit the wall stop their motion and fade out. Gunshots that hit bunnies
will then take on the speed and trajectory of the character, so that it
will then move along with the character as it fades out. The bounding
volumes are precomputed based on the location and direction of the
characters (like the radius of the bunny's head or the length and width of
the robots.)

On-Screen Display: In our game you will notice the bunnies have a life
bar, along with the currently number of lives (in one player mode) or the
total number of gems they have discovered (in multiplayer mode, in which
you have unlimited lives, but will lose 1/4 of the gems you discovered each
time you die.) It also shows the number of gems left in the world. There
is a heads up display. It shows everything on the board, all the current
bunnies, robots, gunshots, poles, found gems, elastic bands, and
vortexes. This was implemented by every function that draws things to the
board also being able to draw things to the heads up display, so it all
occurs in one pass. The HUD is in a different size and location depending
on how many players there are (see three player mode, where the HUD gets
it's own window.) Also, the HUD is scaled appropriately depending on the
size of the current world (the difference in noticable between the regular
and supersized worlds.) 

Camera motion: The camera in the game, just like any character, has it's
own location, speed, and direction, and as the character moves around the
world, the camera fluidly moves with the character to attempt to get the
optimal view without being a boring "stuck to the back" view. This creates
nice effects when the camera rotates around when a bunny hits a wall,
ducks down to see the bunny going through a tunnel, or raises up for more
of a bird's eye view when a bunny is on a raised platform. Whenever the
bunny turns around a pole, the camera location will remain fixed until the
bunny chooses a direction, and which point the camera will rotate to find
the best view. This makes the entire game easier to view, and the intro
and game over screens especially cool as the camera rotates and zoom in on
the arena.

Acknowledgements: The billboarding code for the sparks was based on examples from 
"Open GL Game Programming" by Haawkins and Astle. The blending for the guns was 
based on lesson 31 from nehe's tutorials. The music was by BT and Bach.