Jump to content

Land mass generation


Stroam

Recommended Posts

Bioxx, Tyron, and other game developers all seem to start at landmass generation which makes sense. I have seen many suggestions offered by myself and others on what we'd like the land generation to do. I have made these suggestions in at least partial ignorance without being able to do landmass generation myself. 

I am now spending time on how landmass generation works. This thread will document the resources I use and what I learn and try along the way. The point of this is while I am learning what goes into the generation so that I may make more informed suggestions, I can leave a trail for others to follow who may also be interested in furthering their understanding. So feel free to follow along and post articles on the subject. 

I do best with visuals so I'm going to start my learning with this video series by Sebastian Lague.
https://www.youtube.com/watch?v=wbpMiKiSKm8&list=PLFt_AvWsXl0eBW2EiBtl_sxmDtSgZBxB3

 

Link to comment
Share on other sites

After skipping past the programming part of the videos I understand better how different equations + Perlin noise generate a complex detailed map. What I didn't get from those videos is how you end up with floating mountains and cave generation. Also, the video series used meshes instead of blocks. While blocks would be a simplification it's important to note the differences. Since VS has different terrains and I do not yet know how it determines what terrain type goes where. 

Link to comment
Share on other sites

Okay, figured out how floating mountains happen after watching this video of minecraft world generation. It has to do with the Y lerp.
https://www.youtube.com/watch?v=oLnz640_LDk

still, don't know how different Biomes are generated in minecraft that use different combinations of Perlin noise. Best guess is a height map is used to determine what biome goes where with transitional biomes placed between.

Link to comment
Share on other sites

Fascinating project Stroam. The term landmass would seem to involve oceans and seas I assume. That may lead to at least marginally smaller size world files, where compared to ones which record pure land with no seas. 

Biomes is another issue, and I do not like the random patchwork of Minecraft at all. Obviously Biomes would sit atop landmass, but what they are and why they are there may be affected by factors that can be assumed to exist, through in actuality they do not (like wind and ocean currents). So if you can generate a Landmass map, an abstract overlay of winds and currents could dictate where and what types of biomes exist. It would also affect temperature. That sounds complicated, but it could provide a degree of pre-destination and certainty in the process of placing biomes. A draw back to that idea may be that it would means climatic areas are vast. But that does not mean climatic areas would be single biomes, because a large variance is possible in regions sharing the same latitude.

If you get around to generating polar regions, i would gladly contribute some templates for large scale ice formations.

 

Link to comment
Share on other sites

 

After digging into what it would take for continents, beeches, continental shelves, polar caps, etc. I now realize that this is beyond the scope of the vanilla game. Right now the terrain generation isn't bad at all. The only reason to switch over to the type of terrain I'm envisioning is for increased realism such that it matches players expectations who know a bit about geography.

> A draw back to that idea may be that it would means climatic areas are vast.
This is not the case since the continents aren't that big.

If I had to do some ballpark estimates for what seems reasonable. It takes about a minute to travel 500 blocks. The current edge is 300,000 which is way too far north and south. I think 3000 between continents on average is a good idea. Looking at Australia I think three of them can fit from north to south. Polar caps probably 5000 from north to south making them 10000 when you fold the map in half which you have to do if you want edge wrapping. So from north to south that's 5000+3000+continent+3000+continent+3000+continent+3000+5000 = 22000+3*continent. If we make the total distance for a continent about 3 time the distance of the water between them that's 9000. So that's 22000+ 3* 9000 = 49,000 and 50,000 from the north pole to the south pole seems about right taking in consideration temperature charts that I made. So that's a 100,000 width map by 50,000 high map. So if it were solid land it'd take you about 100 minutes to run from the north pole to the south pole and about 200 minutes around the world. I assume boats will be faster than running so that should be a pretty good size.

If you assume a biome covers about 1000 blocks then each continent would have about 9 different major biomes with many transitional and coastal. If we tile the areas each continent can be spawned in we can cut down on computation and throw randomly generated islands in the spaces between. I think that'd make a pretty good map. Maybe a wee bit grid-like but you'd only notice on a server-wide map.

Link to comment
Share on other sites

From Tyron
assets/survival/worldgen/standard/landforms.json
here's an explanation on the landform syntax: https://wiki.vintagestory.at/index.php?title=WorldGen_Configuration
to be exact: you add a submerged landform = large bodies of water
For continent generation you do would need to adjust the worldgen code, probably by generating a continent map (see GenMaps.cs)
anything thats not a continent on the continentmap would raise the density threshold, effectively drowning the terrain theres a data structure called IntMap that would help with the interpolation of that continent map so that you can smoothly transition from ocean to landmass without the need to generate a 1:1 scale continent map
i'm still secretly hoping that some modders play around with the landform system. it's pretty easy to generate new kinds of landforms once you get the basiscs and quick to iterate on them, since you can reload and regenerate terrain during runtime

Link to comment
Share on other sites

On 9/6/2018 at 12:00 PM, Ivan said:

 Biomes is another issue, and I do not like the random patchwork of Minecraft at all. Obviously Biomes would sit atop landmass, but what they are and why they are there may be affected by factors that can be assumed to exist, through in actuality they do not (like wind and ocean currents). So if you can generate a Landmass map, an abstract overlay of winds and currents could dictate where and what types of biomes exist. It would also affect temperature. That sounds complicated, but it could provide a degree of pre-destination and certainty in the process of placing biomes. A draw back to that idea may be that it would means climatic areas are vast. But that does not mean climatic areas would be single biomes, because a large variance is possible in regions sharing the same latitude.

Actually, that us what VS currently sorta does. It generates a climate map (temperature and rainfall) and a landmass map. Currently there isn't much interaction, if any, between the two, but I could see that rather easily being added in the future. There is even a (probably unused) wind map in the code.

For advanced world generation I would first generate a landmass map, then a wind map based of that, then a temperature and then a rainfall map and maybe then a humidity map. Right now, the climate map is generated using perlin noise, which would have to change to rely on the landmass map, which relies on noise and some other things. It basically all comes down to math, the most important thing being that there is no randomness involved and everything rooting from the world seed (which is the only sorta random thing). So it will be possible to get the landform, climate and wind at any specific coordinate without generating all maps in advance.

Link to comment
Share on other sites

When you talk about the wind map, would that be affected by mountains?
After all, it is one of the main reasons we have more rain in coastal areas, as rain clouds are blocked by the tall mountain chains.

So, if the world generation follows a sequence, as land mass and elevation.
Wind map.
rainfall map.
General temperature as a result of Latitude, elevation, wind, and rain
That would give us the more realistic world generation.

 

Link to comment
Share on other sites

Link to comment
Share on other sites

I think a torus would be alright, as there are no technical problems with it and the effect of a borderless world is archived. I simply don't see any benefits to using any other method that would outway the negatives of being significantly harder to implement and/or having unfixable distortions. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.