Re:Floating point error is the least of my worries (2011)
by golergka on Thursday February 22, 2018 @03:39AM
(#16436158)
Floating point is a trade-off which you just have to consciously choose. Sometimes you need more precision. Sometimes - even less: in my current project, I encode horizontal object position (coordinates x and z) in 2 bytes, while y coordinate (vertical) and all 3 euler angles fit into 1 byte each. It's far from precise, but looks OK from the point of view of our top-down camera, and all movement updates of players and NPCs fit into half of a pessimistic IP packet (about 400 bytes) per frame.
[ Parent
| on HN ]
There are no comments on this comment yet.