Reply To: Performance Issue on Xbox One with BT

NodeCanvas Forums General Discussion Performance Issue on Xbox One with BT Reply To: Performance Issue on Xbox One with BT


Honestly, hard to say. We do have 30-40 agents running at any point starting mid game, and I’m not sure this tool was made to run that many at a time on older hardware (i.e. xbox one). In some games, you might be able to turn off some actions when not near the player/off-screen, but in our game, the AI needs to run no mater where in the level the player/camera is.


In general,

  • When using BehaviorTrees, do not enter and exit states unnecessarily.
  • When using BehaviorTrees, not to overuse Dynamic as it does require checking conditions each frame
  • When using BehaviorTrees, keep logic simple. This is subjective of course, but I think our BT is just too complicated and probably would have done better to write it using a FSM. I was just really new to it all and picked one direction and by the time we got to porting and profiling, it was too late to change.
  • In general make sure your states don’t create garbage, attempt to have a zero-garbage policy.

We got a small performance gain by making our own “node” that managed the leaf node states as a state machine rather than using concepts from a BT – it’s super hacky, but it got us 5-10 frames back.