3 ms·
The rendering can be done relative to the camera position though, can't it? So for the graphics you just subtract all world coordinates from the camera coordin
by jbay808 5y ago
The rendering can be done relative to the camera position though, can't it?
So for the graphics you just subtract all world coordinates from the camera coordinate, and cast the result to float; for the game physics and AI, you work directly in fixed point.
- eropple 5y agoThat is typically done with matrix transformations, which all end up in floating-point space anyway. Having to do integer-to-float transforms for everything to get you there is bad news.
- jbay808 5y agoYou don't need to transform every vertex of the 3D model though. If you're rendering an astronaut on mars, you just feed the graphics engine the relative position of the astronaut and the camera. The detailed rendering of the astronaut's eyebrows can all be done natively in floating point once you've calculated that offset.
- eropple 5y agoI mean...maybe. I am not up on it enough to say, though my intuitive answer is "it's not that simple." But that's just not how any existing stuff works, too. If you want to work with the ton of middleware, etc. that already exists, you work the way Unreal (or Unity, etc.) do.