The Behavior Designer - Formations Pack contains 14 different behaviour tree tasks focused on group formations with Unity’s NavMesh or Apex Path.
Agents can join and leave the formation at any time. The formation will dynamically respond to changes.
The Formations Pack is integrated with the Third Person Controller allowing for movement with mecanim’s root motion. It is also integrated with the Deathmatch AI Kit.
Each task is well commented and written in a generic and clean way making it very easy to integrate into your own project. This pack will continue to grow as we hear new task suggestions from the community.
This is an addon pack for Behavior Designer, which is a behavior tree implementation. You can definitely create a behavior tree which has the AI reacting to other AI agents. You can then use this addon pack to have your AI agents create a formation as it is battling the other agents.
If you haven’t heard of behavior trees before, they are an extremely powerful and flexible way of creating your AI. In fact, major AAA studios use behavior trees for their AI. Here is a general overview of what a behavior tree is, and Gamasutra has a great article on the details for how a behavior tree works here.
thank you for quick reply… I am very interested… I am making mobile game… so performance are important
To be honest, I Bought visual scripting tools but I was very disappointed with the performance
However, a visual script is very convenient and the future
I want to easily implement an automatic battle
if I make 8(AI) vs 8(AI) battle by using Behavior Designer… Can I have good performance as a mobile game?
I think all Visual scripting tool is easy to use… but only problem is performance… as mobile game developer… if If is possible to develop mobile rpg with good performance… I always will be a fan of the product
[quote=“thedreamer, post:7, topic: 575430, username:thedreamer”]
thank you for quick reply… I am very interested… I am making mobile game… so performance are important
To be honest, I Bought visual scripting tools but I was very disappointed with the performance
However, a visual script is very convenient and the future
I want to easily implement an automatic battle
if I make 8(AI) vs 8(AI) battle by using Behavior Designer… Can I have good performance as a mobile game?
I think all Visual scripting tool is easy to use… but only problem is performance… as mobile game developer… if If is possible to develop mobile rpg with good performance… I always will be a fan of the product
[/quote]You won’t have a problem with performance. Here is a test that I did to see how many trees could run at the same time. Granted this was on a desktop machine but it took thousands of behavior trees to start seeing an impact. 16 agents on mobile should be fine. Traversing the Behavior Designer trees is extremely quick thanks to the data oriented design. If you do notice a slowdown it is most likely because of an actual tasks rather than the core behavior tree traversal. For example if you have task which does a GetComponent many times within the same update loop you’ll notice a slowdown, but you would have noticed that same slowdown with a regular MonoBehaviour object as well.
The Formation Pack hasn’t been approved yet but I got a question about the performance of the Formations Pack with hundreds of units. Here’s the profiler for 200 units in column formation:
This was profiled on a desktop built in mid-2011 (3.4 GHz hyper threaded quad core). The most amount of time is spent in WaitForTargetFPS which means there isn’t anything causing a bottleneck. CrowdManager.Update is from Unity’s NavMesh implementation and manages the pathfinding for all 200 NavMeshAgents. BehaviorManager.Update is from Behavior Designer and runs the behavior trees on all of the agents.
As a general update I am still waiting to hear back from the Asset Store team. The Formations Pack is still in “Pending Review” status… the Asset Store team must have a backlog of assets to go through.
The Formations Pack just includes a set of tasks for creating different formations. It doesn’t include any tasks that do the actual attacking. For this you can use behavior trees to determine when/if the agent should attack as well as the attack method.
The nice thing about these formation tasks is that agents can join or leave the formation at any time. This is great for example if you have one agent that is moving in formation and then spots an enemy and wants to attack. What you can even do is have a small group of agents split from the larger formation and create their own formation. This smaller formation can then go and attack the enemy while the larger formation continues on.
So, i can’t use this pack if i’ve not use Unity’s NavMesh?!
And why not an option that allows the group to follow a leader, no matter which system (Unity Navmesh, A* Pathfinding, Waypoint etc…) used by the leader.?
Other integrations are definitely coming I wanted to get it out with Unity’s NavMesh first and add other integrations shortly after that. The first two integrations will definitely be the A* Pathfinding Project and Apex Path. All of the tasks inherit from the same base class so to add support for other integrations I should just need to switch out that base class.