Monday, May 4, 2009

Final Project

For my final project I made a simple game with OpenGL GLut. My original intention was to make a nice looking environment using my OBJ viewer as a starting point. The original camera movements using gluLookAt() proved adequate, and I attached an .obj shotgun to the camera. Due to technical difficulties getting textures uv mapped onto .obj files, I drew most of the environment manually, drawing several buildings into city blocks, which were then translated and rotated into 9 square blocks. I then added a ufo and a single bullet to make a quick gametype.
Use the W key and the mouse to move.
H toggles the hud
J activates player debug information, giving the player location and rotation
K activates ufo and bullet debug information, giving the ufo location, the bullet location, and the distance between them.
Although it still needs alot of work, it is not bad for only 1400 lines of code (many involved the creation of Open GL primatives.)
CLICK THE PICTURE TO DOWNLOAD AND PLAY.

Credits:
Shotgun .obj file:
http://www.turbosquid.com/FullPreview/Index.cfm/ID/308701

Mouse Movement:
http://www.lighthouse3d.com/opengl/glut/index.php?9

Loading Textures:
http://www.nullterminator.net/gltexture.html

Drawing to Viewscreen, Hud, Text to Screen:
http://www.songho.ca/opengl/gl_vbo.html

Obj file specs:
http://people.sc.fsu.edu/~burkardt/txt/obj_format.txt

Other reference:
Open GL SuperBible

No comments:

Post a Comment