CSE 167 - FINAL PROJECT - Snake!

Author: Matthew O. Yang


DESCRIPTION: The traditional Snake game created using OpenGL.

OBJECTIVE: Keep eating fruit while avoiding crashing into the walls or yourself.

CONTROLS:

W -- Snake up
A -- Snake left
S -- Snake down
D -- Snake right

p -- Toggle perspective
SPACE -- Start/Pause game

UP Arrow -- Raise camera (normal view only)
DOWN Arrow -- Lower Camera (normal view only)

ESC -- QUIT


NOTE: Click anywhere on the playing field, then press SPACE to begin.


-------------------------------------------------------------------------

My aim for this project was to translate a simple game (i.e. Snake) into a 3D environment complete with texture maps and changes in perspective. I believe that these goals were successfully met.

For texture mapping, I used files and code fragments from the FourTextures program. I expanded the given code to handle six textures. The texture mapping of the quads (walls/floor) was fairly easy, while the spheres (snake head/fruit) and cylinders (snake body) required some calculations. I used paramentric equations to determine the mapping of these objects.

For the 1st-Person camera, I used the GL utility command "gluLookAt()" to have the camera follow the head of the snake.

