ABSTRACT

In the last chapter, we explored the various character archetypes that exist and looked at how we can use those to help generate characters to populate our game worlds. Our focus, at the time, was primarily on the player character, or the hero. In this chapter, we will expand our programming knowledge by bringing in behavior state machines for a couple of non-player characters. Responding to player input is a fairly straightforward process as we develop the states and the actions that will provide the given functionality for specified inputs from the player. However, when it comes to building behavior systems for characters, we need to have the system gather its own information and respond to it. We will take a brief look at the world of artificial intelligence (AI) and implement a rudimentary system for our Sancho Panza game. We will also consider the complexity of the behavior and response system that is required based upon the character archetype that is being implemented.

What Is Artificial Intelligence?

Different Types of Artificial Intelligence

Determine the Needed Behavior of a Threshold Guardian

Implementing the Behaviors for the Threshold Guardian