Hey, so I’m almost done programming my AI Patrol Bot in C++. It’s been a great learning experience.
Everything was working fine till I made 10 instances of my bot to populate the level: I noticed massive performance drops (and frame drops) while playing the game. This was mainly because of the behavior tree being processed for each instance of the bot every 0.5s.
What I wanted to know is: Is it possible to somehow have a global Behavior Tree? I can’t seem to find any material in this regard.
Right now, in my current implementation, each bot is getting a separate instance of the Behavior Tree at runtime. This seems to increase the performance overhead (My PC is running on an i7, so I don’t think a slow processor is the problem). Or perhaps, is my approach to designing the bots faulty?
Any help would be greatly appreciated.
Thank You