-
Hello, this may be a dumb question, but I'm a gamedev beginner and I'm a little confused about this topic. I’m interested in using LimboAI for a project and wanted to clarify something: Is the Godot 4 addon LimboAI fully cross-platform deterministic? Specifically, can it be used to control AI enemies in a peer-to-peer, 4-player online game with rollback netcode? If not, what can I do to make it work, and would it be difficult? I'm just realizing that to make a rollback netcode project work, the entire game must be deterministic. And a lot of addons and functions of godot, specially the 3d physics, are completly unusable. Just realizied I'll highly need something like this addon, but now I don't know if it's even usable for this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We don't have a support for capturing precise state of a behavior tree - it's simply not implemented. You'd need to find a way to make behavior trees compatible with rollback. I think, it can be deterministic as long as you manage randomness in a controlled manner (or avoid it altogether), and update state machine manually, supplying delta. You can also build behavior trees in such a way that they re-evaluate whole state each time, but it's a rather limiting approach. I assume, you were asking about behavior trees part. State machines are probably easier to use with rollback. |
Beta Was this translation helpful? Give feedback.
I believe, if you use random number generator and rollback to a prior certain state, you'd need to make sure that the generator reproduces the same sequence of numbers from that point. Otherwise, you won't be able to replay state reliably.
LimboAI uses floats in multiple places. We use accumulated delta time in each task to track passage of time in the tree. Tasks like
BTWait
&BTTimeout
for example. That's something to keep in mind. Typically, we use delta time in calculating motion - I don't know how that behaves with netcode. The plugin is open source, so you can tweak things as much as you need it for your project. I believe, the biggest obstacle would be the state capturing and resto…