|
|
|
|
|
by simias
2027 days ago
|
|
What you describe is a common problem for video games, because if the engine uses "absolute" floats for everything in the game you effectively lose precision as you move away from the origin. If your maps get very large it gets very noticeable. I remember for instance in No Man's Sky when you traveled very far in a system you'd start to see the various animations become very jerky because the precision would become too low to represent the coordinates of the intermediary steps correctly. See a random video showcasing the issue here: https://youtu.be/D2XX2ZnRk8M?t=197 You can see all the moving elements jerking around as they "snap" to the next available float value. A common fix for this issue is to use two sets of coordinates: you can for instance represent your world as a grid with fixed-size cells, then you translate all your models into the local cell before computing anything, this way you always have good enough precision since you effectively limit the amplitude of your floats. Of course I handwave many complications here, such as what happens when you're at the edge of a cell for instance, but it's workable. |
|
There's a lot of interesting problems that arise when making a 3d game vs a 2d one.