Runner Game
by Justin Fujikawa
Description
A runner-type game (written in C++ / GLUT / OpenGL) involving hierarchical
modeling, particles, collisions, texturing, and lighting
How to play
- Move left and right to doge poles
- Punch to destroy walls
- Jump over spikes
- You can move while jumping
- You CANNOT punch while jumping, or jump while punching
- Do not fall off the sides of the map
- Press 'r' to restart if you die
Contorls
- a / LEFT ARROW - Move left
- d / RIGHT ARROW - Move Right
- v / UP ARROW - Punch
- SPACEBAR - Jump
- r - Reset the game
Features
- Animated runner
- Random generation of obstacles
- Walls (Punch them)
- Spikes (Jump over them)
- Poles (Dodge them)
- Endless game
- Particle effects (when punching walls and dying)
- Texturing (Cloud "skywall")
- Multiple ways to lose
- Collide with obstacle
- Fall off the stage
- Score keeping
- Level advancement
- Phong shading with directional light source
Pictures
Jumping over spikes
Punching a wall and wall particles
Wall obstacle
One possible pole obstacle
Another type of pole obstacle
Falling off the stage
Death particles
Texture used to texture the "skywall"
Higher levels generate more difficulty obstacles (smaller opening)
Sources
Download
Warning: code is not at all guaranteed to be clean, in any sense of the word, and will only build (as is and as I know) on lab machines (unix).
Source
Notes
- In first submission, there is a missing "break;" following the 'r' case in the switch statement so the lighting changes to show the normals. Press 'p' to change back to Phong shading or use the attached updated source
- In the updated source, there are two new hotkeys
- 'n' pauses the game
- 'N' unpauses the game