First-person shooter project
Let's write a real game! This project will be bigger than any others we've done, so let's start by specifying exactly what to accomplish. We're going to build an arena-based first-person shooter game with the following features:
A world based on a voxel map
A player that can look, run, and jump around in the world
Pointer lock and full-screen, so that the player is fully immersed as in a desktop or console game
The player should be able to shoot at enemies that wander around, and the enemies should shoot back
The player's and enemies' health should deteriorate when shot, and players should respawn when they run out of health
The player's screen should flash red when shot
There should be a HUD (heads-up display) with crosshairs and a health indicator
We do not care much about lighting or texturing, except that the player must be able to see and perceive distances in depth
Note
The complete code is too long to include here, but you can download it online from your account...