Game Development Reference
In-Depth Information
Chapter 4. Crowd Chaos
Part of having a realistic game environment is having the nonplayer characters and
NPCs act in a believable way. Crowd chaos is all about keeping NPCs busy to create
crowded backgrounds for our games. Perhaps your game is set up in a mall, or a city,
or any other place where lots of NPCs need to wander around and look like they are
doing something. Crowds like these will be the subject of this chapter and the next.
In this chapter, you will learn about:
• Working with crowd chaos
• How to create crowd type characters in the React and RAIN AI packages
• Expanding our knowledge of behavior trees
An overview of crowd chaos
Crowd Chaos is all about giving separate interests to a large number of NPCs, so
they look like they are living their own lives. In its lightest form, this can be something
very simple, such as a whole bunch of NPCs picking random targets, walking to them,
possibly sitting still for a moment, and then starting over. This stands out in real-time
strategy games when buildings are constructed, and you see a construction worker
walking to random points of the structure and waving their arms about.
Every game that needs crowd chaos will typically have a basic wandering base, and
it can be extended as needed. Perhaps the crowd will form lines of more NPCs that
are waiting at a spot. Perhaps the targets have changing values and AIs prefer higher
values. They pick up a random block and put it somewhere else. The base wandering
behavior needed for these and other crowd behaviors is what we will implement in
both React and RAIN AI.
Search WWH ::




Custom Search