game-math icon indicating copy to clipboard operation
game-math copied to clipboard

Deterministic float calculations

Open Krakean opened this issue 6 years ago • 1 comments

Hello. Is GameMath support deterministic calculations for floats (basically, restrict precision / fixed point)? Its specifically required to make a game like an RTS networked. Some reading, in case if someone not familiar with the subject - http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/

Krakean avatar May 12 '18 08:05 Krakean

Hey @Krakean!

No, you'd basically have to build your own fixed point arithmetic, and that hasn't been done for this library yet. Feel free to open a pull request in case you're building it yourself!

Also, note that, strictly speaking, fixed point arithmetic is not necessary to build an RTS, but to use the lockstep approach. You could decide to build an RTS without lockstep, if you want to :)

npruehs avatar Sep 04 '18 16:09 npruehs