Behavior Trees
For this project I learned about using Behavior Trees to use for AI on games. This tool is created using a blackboard feature to communicate between agents and it uses a easy to use UI to create a tree that combines custom nodes developed by me in different ways to create 4 specific AI agents for the following demo.
This demo contains a fortress with a tower being protected. There are the following Agents:
Attacker: Advances towards the tower to destroy it, if they see an enemy and that enemy is not being attacked by any other attacker, they will go towards it and kill it.
Defender: Patrols in a small range and attacks any Attacker, even if being attacked already.
Civilian: They get a material from one of the blue piles found at a side of the fortress and take it to the tower, to rise it up a bit more. There is a small chance that they drop the material and have to go back and get another one. If the tower is at its maximum height, they will go to rest to the opposite side of the piles.
Reservists: They usually walk around, in the fortress, but they randomly choose to help the civilians to build, and they can also drop the material. If they see an attacker, they will attack it too, just like the Defender