logoalt Hacker News

JoshTripletttoday at 8:13 AM2 repliesview on HN

I think if it were as simple as "remember the RNG seed", game developers would do it every time. But determinism also means, for instance, running the physics engine at a deterministic timestep regardless of the frame rate, to avoid differences in accumulated error or collision detection. And that's something that needs designing in from day one.

Thank you for still prioritizing it.


Replies

magicalhippotoday at 8:42 AM

> running the physics engine at a deterministic timestep

As well as using special library versions of floating-point functions which don't behave the same across different processors I suppose, if you want to be safe.

Eg cr-libm[1] or more modern alternatives like core-math[2].

[1]: https://github.com/SixTrack/crlibm

[2]: https://core-math.gitlabpages.inria.fr/

Krutoniumtoday at 8:30 AM

Tying physics to framerate at all is a mistake. Like, should be filed as a bug mistake.

There's no scenario in which that's desirable.

And yet even Rockstar gets it wrong. (GTA V has several framerate dependent bugs)

show 3 replies