Improve Behaviour Preformance with large amout of agents

tailevi

New member
I'm looking for a way to improve performance on the Behaviour design side and increase the number of agents. for context the game is an RPG meshed with RTS.
This means I would need to have a lot of units at the same time on the map:
My scene is inhabited by 300 agents which is great, but that's also the mark where the fps drop to 30.
Currently, must of the tasks will return fail beside the tasks of wandering around and searching for items to collect.
The Behavior Manager Object is set to update interval "Every Frame" and Task Execution Type to "No Duplicates".
Also, I don't use any Repeater tasks within my Trees.

the profiler picture is taken from a test build.
 

Attachments

  • deeperlook.PNG
    deeperlook.PNG
    178 KB · Views: 27
  • TreeExample.PNG
    TreeExample.PNG
    167.4 KB · Views: 32
The method that you have highlighted uses reflection so that's slower. If you don't reset the task values on a restart then you won't get that slowdown.

Beyond that you could reduce the tick rate of the tree, or tick it manually and have a different scheme to update the tree.
 
Top