

If you use something like four bytes instead of one, your error drops dramatically… If you’re generating numbers from 0-100, You’d have ~50 “bad” cases (just imagine the remainder is the same) out of 4 billion instead of ~50 out of 256. Unless you’re running a casino or something (and even then…) it’s probably “fine enough” but of course you have to know about it!


Cross products! If you take the cross product of two edges of a face, you get a perpendicular vector for that face. It shouldn’t be too bad to do 20 of those per frame to find if a face is level with the ground (cross product points straight up and/or down depending on how you’re doing them)… now I don’t know about the velocity/acceleration numbers (including rotation)…