Parameter Settings for Project 2
--------------------------------

This file contains various numeric parameter settings used in our
project. None of these are requirements. While you are welcome to use
these values in your program, you are encouraged to experiment with
different settings as well. (Unlike external sources, it is not
necessary to acknowledge your use of these in your ReadMe file.)

If any values appear to be missing, feel free to check with me.

Dave


Window:
-------
  initial window width = 800
  initial window height = 600

  clear color = (0.1, 0.1, 0.1, 1.0)
    (I'd suggest something more distinctive while debugging)

Program Inputs:
---------------

  Camera:
  -------
	Dragging the mouse to the right rotates the camera counterclockwise
	and dragging to the left rotates clockwise. Dragging the mouse down
	increases the camera elevation and dragging it up decreases the
	elevation.
 
    'o/i':zoom camera out/in

	Resizing the window results in a restart.

  Smurf:
  ------
    'w' or UP arrow: move smurf forwards
    's' or DOWN arrow: move smurf backwards
    'a' or LEFT arrow: turn smurf to the left
    'd' or RIGHT arrow: turn smurf to the right

  Other:
  ------
    'q' or 'ESC': quit
    '1/2': switch to Phase I or II
    '+'/'-': increase/decrease animation speed
    'f': toggle full screen
    'p': pause game (smurf/zombie motion stops, camera motion remains)
    'r': restart game

World:
------
  We assume a coordinate system in which the (x,y) plane is horizontal
  and the z-axis points up. (If you do something different, you will
  need to adjust the positional coordinates given below.)

  The static elements of the world consists of a skybox, a ground,
  and light sources (one of which follows the smurf).

  Lights:
  -------
    0: position: (-5, -5, 10, 0)
       color: (1, 1, 1)
       attenuation: a=1, b=0, c=0
  
    1: position: placed 500 units above smurf
       color: (30, 30, 30)
       attenuation: a=0, b=0, c=0.001
  
    2: position: (300, -1700, 300, 1)
       color: (30, 30, 30)
       attenuation: a=0, b=0, c=0.0005
  
  Shadows: (Phase II only)
  --------
    Shadows are cast from the light source 0. The shadow color is
    RGBA = (0.2, 0.2, 0.2, 1.0), and is unaffected by lighting.
  
  Ground:
  -------
    The ground is a 10 x 10 array of blocks, each of which is scaled by a
    factor of 0.9 about its center. The ground covers a rectangular region
    of width and length 5000 and height 50. It makes matters a bit simpler
    to assume that the top of the rectangle is positioned at z = 0.
  
  Skybox:
  -------
    Is a large cube of side length 20,000 centered at the origin.

  Game Termination States:
  ------------------------
    Player wins: All the zombies have been spawned, and all have fallen
      off the ground and gone outside the skybox bounds

    Zombies win: The smurf has collided with a zombie or the smurf has
      fallen and has gone outside the skybox bounds
	
	On termination of the game, the game enters a paused state and the
	skybox is not drawn (thus revealing the clear color for the
	background).

Camera:
-------
  initial rotation = -20 degrees (CCW relative to +x axis)
  initial elevation = 30 degrees (above the ground)
  initial distance = 5000

  y-field of view = 30 degrees
  near clipping plane = 50
  far clipping plane = 100000

  maximum elevation = +0.95 * PI/2
  minimum elevation = -0.95 * PI/2

Smurf:
------
  initial position = (0, 0, 0)
  initial direction of motion = along the +x axis

  diffuse color = (0.45, 0.80, 1)
  specular color = (0.25, 0.25, 0.25)
  shininess = 100

  horizontal velocity increase per impulse = 400
  vertical velocity when jumping = 800

  friction coefficient = 0.05
    Friction decreases horizontal speed when the smurf is walking. (It
    has no effect when jumping or falling.)
      horizontal speed *= (1 - friction coef)

  maximum horizontal speed = 600

  gravity coefficient = 800
    (This dictates the amount by which the smurf's vertical speed
    decreases when jumping or falling.)
      vertical speed -= (gravity coef) * (elapsed time)

  Phase II:
  ---------
    maximum turning speed = 120 degrees per second
      (The smurf's motion responds instantly to impulses, but the
      direction in which the smurf is facing for drawing purposes
      changes at this speed)

    tumbling speed = 30 degrees per second
      (This is how fast the smurf rotates when falling)

Body: (Common to smurfs and zombies)
-----
  Our body consisted of 6 solid spheres (head, torso, two hands, and two
  feet), each with 10 stacks and 20 slices. We'd like you to come up
  with your own body design.

  Our body is about 280 units tall, the torso is about 100 units
  wide, slightly wider from the left to right than from back to front.
  
  Collisions: (Phase II only)
  ---------------------------
    We use these dimensions to form a bounding box which is used for
    collision detection. (This is very crude. Our bounding box does not
    rotate as the smurf/zombie rotates.) The smurf can only collide when
    walking (not when jumping or falling).
  
  Walking: (Phase II only)
  ------------------------
    The walking motion is a function of the horizontal speed. In
    particular, each time the body travels s units of distance, we
    define an angle theta to be 2*sin(s/10) degrees. (As the body moves,
    this angle oscillates between +2 and -2 degrees.) To create a
    toddling-like motion, we tilt the entire body by this angle from
    left to right. The feet are also rotated about an imaginary hip
    joint that lies near the base of the torso at 10 times this angle.
    (Thus, the feet swing between +20 and -20 degrees in synchronization
    with the toddling of the body.)

Zombie:
-------
  diffuse color = (0.5, 0.0, 0.0)
  specular color = (0.25, 0.25, 0.25)
  shininess = 100

  horizontal speed = 200

  maximum turning speed = 10 degrees per second
    (The zombie turns to chase the smurf, along whichever direction,
    clockwise or counterclockwise is smaller.)

  gravity coefficient = 800
    (This dictates the amount by which the zombie's vertical speed
    decreases when falling.)
      vertical speed -= (gravity coef) * (elapsed time)

  Phase I: There is only one zombie
  ---------
    initial position = (0, 1000, 0)
    initial direction of motion = along the -y axis

  Phase II: Zombies spawn randomly
  ---------
    initial spawning rate = 0.5 zombies per second
    maximum number of spawns = 20

    spawning acceleration rate = 0.005
      (The rate at which zombies spawn increases over time, until the
      maximum number of zombies is reached.)
        zombie spawning rate += (spawn accel rate) * (ellapsed time)

    rising speed = 30 degrees per second
      (This is how fast the zombie rotates when rising up from the ground)

    tumbling speed = 30 degrees per second
      (This is how fast the zombie rotates when falling)
