An open world is a level or game designed as nonlinear, open areas with many ways to reach an objective. Some games are designed with both traditional and open-world levels. An open-world facilitates greater exploration than a series of smaller levels or a level with more linear challenges. Reviewers have judged the quality of an open world based on whether there are interesting ways for the player to interact with the broader level when they ignore their main objective. Some games actually use real settings to model an open world. We can have not only explore the environment but live inside the story of the character as we can not go out and explore ourselves due to the pandemic and it seems to have caused a lot of problems to everyone and to reduce that we can think out of the box in an open-world game .
If you want uniform coordinates everywhere, with a true global origin, consider using 64-bit integers in a fixed point representation. That way, you’re guaranteed a uniform precision throughout the entire world. You don’t want the rules of the world to vary ever so subtly as you move around in it.
If you need to perform floating-point arithmetic, say for physics, create a local “origin” and map the fixed point coordinates onto the local origin.
Even if you divide your coordinate system hierarchically so you no longer have a global origin, you still might consider a fixed-point representation for the world so you have uniform precision throughout a sector of the map.
You’ll only ever need addition and subtraction in the fixed point coordinates, to translate the world (or sector) coordinates to “local, where the action is” coordinates. That’s no more costly than integer addition. That does mean, though, that you’re going to have to maintain your “locus of action” coordinates in fixed point as well.
You only need to convert in one direction most of the time: fixed to floating-point. The easiest way is to multiply by a constant scale factor, and based on a quick test here, it also appears to generate decent code. It also appears to be better code than you’d get calling the library function scalbn.
One place you might need to convert in the other direction is when you update the “locus of action” you’ve centered your math around. But, that’s relatively infrequent relative to all the other math.
Those were all the problems I ran into while working on the game and along the way, I came to learn about so many things.
Technologies used
Discussion