I’m shopping around for a new BT solution and I have some questions regarding nodeCanvas. How are BTs saved, are they compiled into scripts or saved as binary/json?
Our projects has quite advanced AI and large trees and one of the issues we have with our current solution is that the deserialization of our BTs causes quite large spikes. It is also not possible to pool instances of BTs in a good way with our current solution.
What I would be looking for is fast deserialization or a way to load a tree up front which can be used/duplicated for several AI agents with little overhead.
Any insight into this would be greatly appreciated (I have not downloaded the package yet), I thought I would ask before I start profiling.
BTs (and all other graph systems) in NodeCanvas are serialized and deserialized to/from json.
Due to this fact of course, and even though I’ve done a lot of performance nitpicking modifications to the json serializer used (FullSerializer), there is bound to be an overhead when a BT is deserialized due to inevitable memory allocation taking place on deserialization.
When a tree is instantiated to be used by an agent, even though there is some caching going on to avoid the same json from being parsed, deserialization is once again taking place and as such an overhead will as well.
Of course, one solution to this, would be to instantiate your agents in loading time, disabled them and only enable them when they are meant to actually be used in the game. That is considering the fact that you have a lot of agents of course.
I hope this information help, but please. If you have any questions, do let me know.
Thanks again for your interest in NodeCanvas! 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.