Chapter 5. Non-Player Characters
In this chapter we will cover:
A* pathfinding
Character state machines
Constructing dialogue
Decentralizing behavior
Introduction
This chapter is all about adding intelligence and personality to the Non-Player Characters (NPCs) that inhabit your world, or at least adding enough of an approximation to satisfy the requirements of the game.
Need a gruff old-timer who quickly grows tired of too many questions and storms out of the room in disgust? By the end of this chapter, you should find yourself with the architectural building blocks to know how to construct such an unsavory character.
This chapter also includes a brief exploration into the realm of decentralized behavior, which can be a useful way to model everything from a flock of birds to a traffic jam.