O'Reilly logo

Game Development with Three.js by Isaac Sukin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required