Game Development Reference
In-Depth Information
fining states and transitions, behavior trees focus on defining behaviors, also called
tasks, for characters. Each behavior is a node in the tree and can consist of different
sub-behaviors; so, instead of a general graph, a tree is created of different behavi-
ors, where each behavior is a node on the graph.
At every update for the character, the behavior tree is traversed, starting at the root
node and searching down the tree. The different behavior nodes execute and return
if the task is running, or has completed successfully or failed. If the node is in a run-
ning state, it is updated. Behavior trees are built by creating and configuring different
behavior nodes.
We will focus on RAIN's behavior tree system in this chapter. We can use a different
behavior tree system or create one from scratch; the basic logic is the same for all
implementations. When using a behavior tree system, the most important thing to
know are the different node types that we can use; so, let's look at RAIN's different
behavior nodes.
Search WWH ::




Custom Search