Steering framework

This project provided an extensible framework for creating agent steering systems that I have used in several projects and still build on today.

While most of the systems are structured around context maps, other steering algorithms could be used, including taking manual control. Additionally, steering providers can be swapped out at runtime, allowing for discrete states with their own behaviors.

The goal of the first iteration was creating an agent to wander in a space without colliding with static obstacles or other agents. This iteration laid much of the groundwork, such as a basic context map, or the ability to swap out steering providers at runtime. This was useful for taking manual control of an agent to test other agents’ responses. Wandering used a noise field, which the context map mixed with collision response.

The goal of the second iteration was to implement flocking while still avoiding collisions. This iteration saw a refactor of the context map system to use modular “building block” behaviors, with standardized weight and shaping functions to further customize behavior. This also allowed me to write an editor script to preview and tune the results of each building block.

I had originally written this system with Lanternbound‘s enemy AI in mind. Lanternbound made use of swapping steering algorithms to separate attacking structures from pathing towards the player’s lantern tower using Flow Fields. This swap was handled by a separate target evaluation system.

The following semester, I used this system again to create enemies in my project creating a tactile revolver in VR. This saw even more distinct behaviors to create a more dynamic attacker. Instead of wandering the space freely, they periodically pick a point around a guard post and move to it. The next steering provider activates once the player is sighted: the enemy is ranged, so it attempts to hold a distance and orbit the player. Next, there are steering providers to prepare to attack and then attack. These are implemented as slowing down, then stopping and facing the player, but these could be changed using data only for a melee enemy to approach the player directly.

Leave a Reply