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

Chapter 4. Adding Detail

This chapter explains how to manage external assets such as 3D models, as well as add details to your worlds with particle systems, sound, and graphic effects. It will also elaborate on the arena first-person shooter game we built in Chapter 3, Exploring and Interacting, to turn it into a Capture-the-Flag game.

Setting up CTF

In order to have a proper Capture-the-Flag game, we first need to have teams. There are several things that need to be associated with a given team:

  • Flags (and the flag color)
  • Players (and the player skins)
  • Spawn points
  • Bullets (if you want to avoid same-team damage)
  • Potentially map decorations/materials

The simplest way to associate each of these elements with a team is to just add a property with a simple ...

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