Closed piller187 closed 4 years ago
Yep, I use the weighted search for rivers/roads in a procedural world that has to be deterministic. As long as your inputs are deterministic the outputs should be. At least I haven't noticed it deviating over the years I've been using it.
Hey piller187, as @bradzoob said the A* algorithm (and this library) are completely deterministic. No randoms involved :)
Is this pathfinding library deterministic? I'm making a multiplayer game and I run this both on the client (for instant response feel) and server (to validate). My plan is to pass the starting row/col and the path that the client instance of this pathfinding found to the server and have the server use the same starting row/col and the map itself (which should be the exact same on both client/server) and run to get the path and compare it against the path the client send to make sure it 100% matches, but just curious given the map is setup and same starting row/col will I get the exact same path on the server that the client code came up with?
I don't just use the client path because I have to check for cheating (this is really the only reason for doing this check on the server) and the exact path is important as things along the path can cause harm.