Behavior Trees / Perception


First package and milestone,

The game is being built using the Unreal Engine's Third Person Template.  This allowed me to jump straight into building the Artificial Intelligence (AI) of the enemy controller using the Behavior Tree (BT). Logically this made sense. Actions are listed left to right using Selector Nodes and Sequence Nodes to control the flow of logic. Instead of functions, BTs use Tasks (BTT) which are very small functions, usually specific to a single action. The BT was structured much like a finite state machine, which each state being an action the AI could take. Currently I have Roam, Investigate, Attack, Reset and the beginnings of Flanking (just need to read more on the Environment Query System (EQS)).

Version v0.1 has the AI patrolling and will make a single attack on the player if approached. I have yet to fully develop the animations so the enemy character does a flashy T-Pose break dance. As this is a programming assignment focusing on combat management, animations will be delayed. The player character may also make noises by jumping near the enemy character, causing it to enter investigation mode, homing in on the noise location. If the player character is spotted the AI controller will switch to attack mode. Finally, after any action taken the AI controller will reset and commence roaming again. I did start the Flanking state with the intent to have the AI controller circling the player outside of melee range, however I have opted to push the current version to demonstrate progress.

The next step after setting up the flanking state is to introduce multiple AI controllers and debug any subsequent issues. This will lead into the introduction of the combat controller object, which will assign priorities to the AIs, determining which can attack and which will flank in a 'holding pattern'


Week 1 - Building the world, creating characters and designing behavior trees. - complete

Week 2 - Develop the behavior trees for multiple tasks. Tasks include free roam, attack, flank, investigate and reset. - complete

Week 3 - Create Combat Controller Object and communicate with AI characters

Week 4 - Refine Combat Controller to manage multiple AI characters 

Week 5 - Fault finding and bug fixing

Week 6 - Polish

Get Combat Director Demo

Leave a comment

Log in with itch.io to leave a comment.