Cross platform determinism issue (Windows - Linux) #1413
Replies: 3 comments 11 replies
-
Hello, These things are very hard to debug. What I do is to enable
This will print out all float values in hexadecimal format so that it is easy to spot 1 bit differences. I then use a text diff application to compare the text streams between platforms. When I see a difference, I add more Specifically for |
Beta Was this translation helpful? Give feedback.
-
B.t.w. If you have a repro case that you can e.g. insert into the |
Beta Was this translation helpful? Give feedback.
-
Hello @jrouwe, I have been able to collect some more information and verify that the determinism issue occurs on a single byte, specifically related to the contact "distance." Following is the initial state received from the linux server and before processing
Here the State after processing
As you can see, the VirtualCharacter state generated by the Linux server has the contact I'll keep investigating and reporting any updates. If anything comes to mind or you need anything from my side, let me know. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am encountering a problem in maintaining Jolt determinism between two different platforms, Windows and Linux, where the client runs the game on Windows and the server instead on Linux.
After several tests and having disabled all the game code to ensure that the determinism issue is not caused by the game, updating Jolt to the latest MASTER version, and making sure not to use SIN/COS/ATAN/sort, I have observed that Jolt does not behave deterministically. A small note: when both the client and the server use Windows as the platform, everything works perfectly.
To provide some context, the game is implemented in Unreal Engine, and Jolt is compiled as part of a CMake library that contains both the gameplay code and the state synchronization code alongside Jolt. This library is statically linked to various Unreal Engine modules (DLLs), which read states and positions to update the positions of the various objects on the screen. This setup ensures that all the gameplay code remains separate from Unreal Engine, allowing complete control over the execution flow as well as the compile flags, enabling the setting of various flags like /fp:precise, etc.
The synchronization problem appears somewhat everywhere, but in my test setup, I am focusing on the VirtualCharacter (Kinematic). What I do is process the character with hardcoded velocity and direction to ensure there are no external interferences. Nevertheless, consistently, the buffer produced by the client differs from the buffer produced by the server.
Have you had similar experiences?
What can I do to identify the problem?
Here is the CMake code I use to compile Jolt:
VirtualCharacter processing CPP
Beta Was this translation helpful? Give feedback.
All reactions