Game Development Reference
In-Depth Information
Chapter 7. Adaptation
Having good AI for our characters is more than just giving them simple tasks to per-
form; we'd like to have our characters realistically react to the game environment.
Game events such as seeing new objects appear or having a bomb go off in a scene
should cause a reaction in the AI. Having the AI adapt to the environment is a huge
topic, but we will focus on the basic ways to have AI adapt to the environment. In this
chapter, we will look at taking AI skills we learned in previous chapters and combining
them to create AI characters that adapt to the game environment in a realistic way,
changing their tasks based on game events.
In this chapter, you will be:
• Creating AI characters that react and adapt to multiple game events
• Setting up more complex AI characters in RAIN
• Getting to know the importance of creating larger AI scenes with REACT AI
An overview
In previous chapters, we looked at how to do different specific AI tasks. We learned
how to make characters patrol a path, have them wander an environment, change
state with behavior trees, and sense objects in the game environment. These are all
important, but it's more important to understand how we can combine these different
elements to make AI that works well in a large game environment. We will need char-
acters that can navigate an environment to perform tasks but then change based on
game events that occur. To do this, the game needs to be designed at a high level,
defining what the different AI character's main goals and actions are. These high-level
goals are things such as wanting an enemy to patrol an area until it sees the player
and then start to chase and attack him. From there, the different aspects of sensing
need to be designed for the level, deciding what objects need to be tagged, so they
can be used by the AI system. The characters then need sensors defined for the AI
characters and high-level goals can be created using existing nodes and custom ac-
tions.
One of the ways we can define our character's adaptive behavior with RAIN is using
RAIN's motor system. We have been using the motor system with the move node
but not directly. The motor system controls moving the character, and it is available
Search WWH ::




Custom Search