Operation ToeTag

Image

OTT is my final project for CPE 471 - Intro to Computer Graphics

The goal for this project was to make a third-person air assault game that shows off what I had learned during the class. Initial objectives included:

- Have the camera follow an airplane model
- Shoot projectiles at enemies
- Have the enemies fight back
- Possibly multiple levels

Design

Image

Models

All of the models included in the game were downloaded and were drawn using Blinn-Phong shading. At startup, all of the models are given random shader properties so it looks different through each play-through. The shader for the bees was modified slightly to add noise so that they stand apart inside the room.

To increase difficulty of the game, the player can hit 'H' to enable "Hard mode." This changes the shader for the room to be the same as the shader for the bees and helps the bees blend in a little better.

Image

Physics

To make the plane fly around, the user presses the W/S keys to increase/decrease the plane's velocity. The user can also use A/D to roll and move the mouse horizontally/vertically to control the yaw/pitch.

Collision

Due to a lack of time at the end of implementation, collision detection was implimented as a proximity check. Every time the objects were drawn the plane would check its distance to each bee. If the distance was below
a certain threshold, the bee would perform its death procedure.

Image

Sounds

For certain situations, the game will play different sound effects. OTT uses mpg123 (a command-line program) to play all of the sounds. Any time the user speeds up or slows down the plane, a thruster sound will play. Whenever a missile is fired, a missile launch sound is played. When the player kills a bee there is an explosion sound.

Difficulties

The first major difficulty for Operation ToeTag was making the camera follow the object through all of the rotations and translations. All it took was a little bit of time to realize that the camera matrix simply had to be the inverse of the model matrix.

After getting that over with, I had to figure out a way to kill the bees. I did not have enough time to implement a particle system to shoot projectiles, so I had to improvise. Using the position of the plane and each bee, I implemented a proximity check that killed the bees whenever the plane got close.

Finally, the last objective left to implement was to make the bees fight back. Sadly, I had run out of time and was not able to implement this goal.

Screenshots

Demo