4 ms·
I used fixed point for my game's physics, because I wanted things to be deterministic across platforms and compilers (the game has a hidden "solver" which is us
by TheNewAndy 5y ago
I used fixed point for my game's physics, because I wanted things to be deterministic across platforms and compilers (the game has a hidden "solver" which is used to tweak things a little bit to make the game more fun, but this involves rerunning simulations multiple times).
- TheNewAndy 5y agoI did need a sqrt, but I cared more about predictability than accuracy, so I just did an iterative algorithm (actually two - one for the integer part, and then a second one to get better precision)
- whateveracct 5y agoDid you use stdfix, another library, or just hand-roll it?
- TheNewAndy 5y agoHandrolled. It looks like this: https://ideationapps.com/2020/12/09/making-two-birds-fixed-point/ https://ideationapps.com/2020/12/09/making-two-birds-fixed-p...