AI Behavior Trees + Perception



For Coding II, we created an AI that perceives the player with both sight and hearing. This is done with the AI Perception component that comes with many features of perception already implemented. 

This component was placed on the AI controller, which acts as "the will" of the AI.


We then created "the brain" of the AI with a behavior tree. The AI exhibits simple behaviors of patrolling the level until spotting the player. Once spotted, the AI will chase the player down and attack. If the AI hears the player without seeing them, it will investigate the area the sound was created in. This behavior was possible to create by using the black board (the "memory") of the AI to store variables needed.

Multiple tasks and decorators were created so they could be placed modularly in behavior trees.


Get Coding II + GDIII: Toy Project - Wobbly Slapper Toy

Leave a comment

Log in with itch.io to leave a comment.