Welcome to Target Practice!
The premise of Target Practice is based off of shooting gallery type
games you would normally see at a carnival. The difference is that in Target Practice,
you are able to walk around the room freely and are not confined to one spot. All targets are
randomly generated each round, so be ready for them to appear anywhere!
How to Play
- Press the spacebar to start the game.
- Shoot all targets within five seconds to complete the round.
- If a round is not completed within five seconds, you are brought back to round one.
You will be notified via the console how long it took you to complete the round
and whether or not you have successfully completed that round.
- Each round has an increasing number of targets.
- Advance through all seven rounds to complete the game!
- 'w' - Walk Forward
- 's' - Walk Backward
- 'a' - Walk Left
- 'd' - Walk Right
- Mouse - Look Around
- Left Mouse Click - Shoot
- Spacebar - Start/End Game
The game was mostly based off of Assignment 3 (Blinn-Phong Shading)
and Assignment 4 (Free Look Camera) code.
Collision detection for the targets was implemented using the GLM distance function.
Once a target is hit, the bullet will disappear, not allowing for collateral damage.
Collision detection for the walls was implemented by not allowing the user to go past
certain world coordinates.
- All lighting was done using the Blinn-Phong Shading model.
The bullet path was calculated using the user's position and the sine and cosine
of the pitch and yaw of the camera.
The draw distance of the bullet was calculated using the distance between the bullet
and the camera. The limit was 20 world units.