#Deterministic physics for Gameobjects

1 messages · Page 1 of 1 (latest)

gilded cypress
#

Currently going through the process of restructuring my game after realising client prediction is necessary. I’ve been informed that traditional unity physics is non deterministic. Which is leading me to the path of building my own physics component. But how do I ensure my own physics script calculations are deterministic? Should I be avoiding math library’s or do some custom rounding?

glacial fulcrum
#

I'm not computer scientist, but my understanding is that the issue is surrounding floating point operations. I'm sure Gaffer on Games has a article on determinism but here is a good one from the Box2D devs
https://box2d.org/posts/2024/08/determinism/

gilded cypress
# glacial fulcrum I'm not computer scientist, but my understanding is that the issue is surroundin...

Do you know of any examples of client Prediction models? I want to know how other setups push there clients simulation ahead of the server, Currently im just forcing my client to step through 25 frames worth of physics & movement at the start to fast forward the simulation, but 25 frames ahead is too far ahead, id like my clients to consistently be 3-5 frames ahead of my server but this has proved more difficult than i originally thought it would

#

Using Ping doesn't seem great to use here as it seems to be somewhat inaccurate sometimes which can lead to my client falling behind again

glacial fulcrum
oblique dew
#

I'm also not sure what else there is to use besides ping/latency.

gilded cypress
#

in that video the boat is moving at 50FPS because its moving in fixed Update