Behavior Tree Overview
The purpose of this section is to give an overview of how the Deathmatch AI Kit behavior tree works. In addition to the Behavior Designer documentation, the following pages contain more resources for how behavior trees work:
- Gamasutra – Behavior trees for AI: How they work
- Opsive Character Controller Integration Explanation
- Awesome AI made Easy with Behavior Designer
- Unity AI Guide: Create a Autonomous Game with Adaptive NPCs
- Recreating the FALSE KNIGHT Boss Fight
- Practical Guide to AI in Unity
The Deathmatch AI Kit behavior trees are saved using External Behavior Trees. External behavior trees are used in this situation because they allow you to dynamically assign the behavior tree at runtime. In the case of the Deathmatch AI Kit, at the start of the game either the Solo or Team behavior tree is used. These trees are extremely similar, except the Team behavior tree contains tasks specific to operating on a team (such as requesting backup). The Solo and Team behavior trees then use the Behavior Tree Reference task to load subtrees at runtime. This allows us to reference the same subtree within both the Solo and Team behavior tree. For the first part of this overview we will only be focusing on the Solo behavior tree. The reason for this is that the Solo behavior tree is a subset of the Team behavior tree.