4 ms·
But if infinitesimal disturbances to the results makes a practical difference to the game, then your physics engine is not stable.
by markrages 12y ago
But if infinitesimal disturbances to the results makes a practical difference to the game, then your physics engine is not stable.
- Terr_ 12y ago> But if infinitesimal disturbances to the results makes a practical difference to the game They don't! The system can tolerate answers which are slightly wrong... as long as all machines calculate the SAME slightly-wrong answer. The same logic applies to synchronized PRNGs. It doesn't (directly) matter what the "random" dice-roll result is, as long as all clients get the same answer.
- markrages 12y agoAh, thank you for this response. It "clicked" for me: Game developers are using the low bits (below significance) as pseudorandom numbers! They are overloading a new function on top of the existing use of floating-point numbers.
- Terr_ 12y agoThat's not what I'm saying. I'm just trying to give you an example where a "correct result" is far less-important than a "deterministic result".
- tomlu 12y agoNo physics engine is stable in that sense. Neither is the real world. You need full determinism to do what lmm is saying. Source: Worked on this exact thing for commercial multiplayer games.
- teraflop 12y agoMany interesting physical phenomena are deterministic but chaotic, in the sense that arbitrarily tiny changes in initial conditions can rapidly lead to arbitrarily large changes in behavior. Would you say that anyone who tries to make a game that has the same property is "doing something wrong"?
- Scramblejams 12y agoYou're probably imagining a short-lived game. Think of a game that goes on for months at a time. There are ways around this, but none of them as elegant as a floating point routine which produces the same results on any platform across any ordering of calculations.
- jephir 12y agoEven for short-lived games, if you want to implement a replay system, you need your physics to be deterministic.
- TeMPOraL 12y agoIt's a feature of physics, not physics engines. Many process in the real world are exponential in nature, so even a very small difference gets magnified very quickly.