Pathfinding is deterministic as long as the following requirements are met:
- You do not use any explicitly non-deterministic classes (e.g. RandomPath, FleePath, AlternativePathModifier)
- The floating point operations on both machines are the same. In rare cases floating point operations on different machines can give different results due to extended precision. This is a very problematic point for doing any kind of deterministic operations with C# that uses floating point. The C# spec explicitly allows evaluating floating point calculations with a higher precision that strictly necessary (e.g. using 86 bits instead of 32 or 64 bits). Some computers will differ here. For this reason alone I would strongly recommend not to rely on deterministic behavior across multiple different machines (unless you completely avoid floating point operations).
- Path requests and graph updates are ordered in the same way for both machines (if you update the graph on one machine before some path was calculated it may give a different result compared to on another machine where the graph update was done after the path request).
Note that since path requests in this package are asynchronous they may take different amounts of time to calculate on different computers. This could be a source of non-determinism. You can force paths to complete immediately using the path.BlockUntilCalculated method if you want to avoid this.
Also note that the included movement scripts are only deterministic if the frame rate is identical. Otherwise they may diverge veeery slightly. For example moving over two frames with a delta time of 0.1 and then 0.2 is not necessarily the same as moving with a delta time of 0.3.
The RVO requires some minor changes to be deterministic. I assume you have some kind of fixed frame rate tick that you use for the rest of the game. You’ll have to modify the RVOSimulator and RVOCoreSimulator classes so that the RVOSimulator is ticked at the same time as your fixed frame rate.
Here is a diff that simplifies this a bit for you: https://pastebin.com/Dpywr6ai you essentially need to change it so that the Update(deltaTime) method is called once per your fixed frame rate tick.