Making Earth Sized Terrain?

I’m looking into the possibility of making a flight simulation game, but my problem is that i want earth the be the terrain. I have tried making the terrain the correct size and that didn’t work as it is 506.45 million km^2. I have also looking into the possibility of making a planet and doing it that way but i don’t even know where to start from there. Any Ideas?

You would need to implement a chunk based system to load the world from a seed, it would be best this way because you could literally procedurally generate the entire world and not have to save anything ( if its not destructible ) and allows for pretty much infinite travel. You could use a noise library to generate noise based on a seed, then in the background of the game, load and unload " chunks " of terrain in and out which are far away.

As for making it like the earth, you would need some sort of heightmap data for the generation, which may be quite hard to implement. With noise however you can generate some pretty realistic terrain, especially when combining noise together.

You’ll probably be wanting to create something like what they have in Elder Scrolls games, where they split their world up into chucks then stream them as the player moves through the world, although this will depend on what sort of flight sim you want to make. (I envision something like a free world flight sim where you can crash anywhere, as opposed to more like a space sim where you will never get close to the ground)

Also note that simply making the terrain won’t be enough since it will need to loop somehow, and if you make it spherical (ie- a planet) you’ll have to fight with the physics engine to make it work how you expect (but this is a solvable problem, and probably the least of your worries!).

For the specific case of a flight sim, you will probably need to have a lot of levels of detail, depending on how high you fly/etc. At higher altitudes you will need to display much more land but the level of detail can be much much lower. And on that note, how do you plan to “make” the “level”? A possible (and interesting) solution would be streaming google maps data, but I doubt the “ground level” will be at the sort of detail you’re after. It might be possible to procedurally cities based on the map data with generic buildings specific to each country/region and maybe a few more specific landmarks, but how serious you get depends on your project, of course.

Another thing that might get in the way eventually on this kind of scale is the resolution of floats. I seem to remember in Morrowind when modders expanded the map massively some objects sort of “twitched” between two points because their positions were not accurate enough… Google says circumference of the earth is 40000km. Wiki says single float is accurate to about 7.225 decimal digits, so near the edges your resolution could be in 10s of meters!

I think you need to sit down and work out a few specifics of what you want to accomplish. Are you looking to make something more like space sim, where maybe you take off from a set location then fly so high that detail is moot? A fighter where you fly in specific areas/very high?

Anyway, hope thats enough to get you started! Sounds like an interesting project! :slight_smile: