First, apologies for bringing up this topic, but I’m still not sure where to go next.
The Project
- A 4x type space exploration, combat, and trading game.
- I’d like the game to have the kind of scope felt in Egosoft’s X3.
- LAN based (non-authoritative) multiplayer anticipated.
The Problem
You guessed it, I’m not sure what’s the best approach to handle very large map areas. I know that precision becomes a problem due to single precision floats. What I don’t know is what to do about it. Here’s some questions that I’m hoping some of the smart folks in the community can help with (BTW - I am a licensee so I have Pro if that makes a difference).
Possible Approaches
- I could try to alter the scale, but I’m concerned that this will make things seem to move slow when they shouldn’t. There is going to be some “twitch based” combat elements, so projectiles need to be able to impact other objects and ships need to fly near each other and other objects at a believable pace.
- I could just live with the largest useful map size and divide things into sectors the player has to “warp” into. But, how big is that? What’s the largest size I can get away with using? Perhaps 99,999 m? That leaves 2 digits for precision, but is this big enough for a couple of planets, stations, capital ships, and other cosmological artifacts? Does the level technically have to have a boundary? maybe I can let people go as far as they want, but change the scale once they get beyond 100K, and make sure there’s little to no interactive material outside that range.
- Maybe I could just stitch a whole bunch of “areas” together, so the coordinates stay in a reasonable scope, but won’t that make it really difficult to handle projectiles traversing from one into another? I suppose I could render a block of nine “levels” and just make sure nothing “shoots” or is “shown” beyond that horizon, but how hard is it going to be to manage the objects and such in this approach?
This last approach seems like a good way to go but I’m a bit confused about it. I’m so used to making terrain maps, but with a space sim there is no terrain map. So, Instead of having a block of 9 terrain maps, what do I have? Do people typically just make terrain maps and then delete the actual terrain? I’ve seen that if I make two maps, that Unity will render objects from one from to an FP player in the other.
So again, apologies for the “noobness” level of the question. Please know that any help will be greatly appreciated.
Maulkye