Used fixed point arithmetic in energy & health
Indy2222 opened this issue · 0 comments
Indy2222 commented
For the sake of determinism: for example float addition is not commutative due to precision issues.
Idea: implement a simple fixed point type in de_types
which uses i32 as the storage. Use ~10 bits for fractional part. Ensure that the minimum and maximum representable value is small / large enough for the game purposes.