Jump to content

Large scale world generation


AdrianNumbers
 Share

Recommended Posts

I would like to say first that im not a coder by any chance so my logic here can be entirely wrong but still based on my limited knowlage it looks fine so i decided to post this idea.

On small scale game world generation is already briliant but the more you zoom out on map the more it look like just random noise. Solution i though of is based on two things height maps and marching squares techniqe. 

Process could look something like this

1. Generator generates a contour map of tectonic plates based on world dimentions , seed , type of generation (in settings there would be an list of possible algorythms like : continets , pangea , islands and so on) , other settings like water procentage and provided algorythm using marching squares. (Resolution could be down to chunks or even group of them as this map is just a reference point for generator to use down the line) On this step generator also decides which plates will oceans and which continets. I also sets "movement" vector for each plate based on set of rules (for example ocean plates are more likely to move away from each other)

2. Using map from step 1 as base generator produces height map (again using marching squares) of terrain formation taking into consideration how doferent plates interact with eachother on borders

 Ocean plates - O

Continental plates - C

O->I<-O underwater mountain range , islands

O<-I->O underwater rifts or vulcanos , vulcanic islands

O->I->O just a normal seabed or lesser versions of all other types of O-I-O border

C->I<-C mountain range

O->I<-C mountain range, clifs 

And many more possible combinations

End product of step 2 looks like a topographic map resolution down to at least chunks maybe higher like 1/4 or 1/8 of chunk for Z and X cords and 4 , 2 and 1 respectively for Y

3. Adding rock type areas acording to set of rules and map from step 2

4. Temperature map made using map from step 1 and settings chosen before generation. In settings we chose how streched temperature gradient is (south north) and this gradient is influenced by oceans the depper into ocean the less extreme temperatures are, land being the other way around.

5. Simulation of water circulation and wind

As we all know oceans are places where most water vapor is generated and it later drifts to other places as clouds and those are moved by wind which is generated by diferences in atmosferic pressure and temperature (there is a lot of other variations whole subject of weather is insanly complicated so i will grosely oversimplifie it here)

A. Generator using maps from step 1 and 4 makes general wind pattern (wind moves from low temperature zone to high with some randomnes or not)

B. Using maps from step 2 , 4 and A generator makes height map of humidity acording to rules such as humidity os highest over open water and moves from it with wind , decresing over time as it moves over land , mountains act as bariers and deplete it very fast , usualy making mountains humid from one side and dry from other , temperature would also have an impact here.

C. Using maps from step 2 and B underground water level map is made thats similar to topographic map and then its compared to map from step 2 and whenever Y level of water is higher than ground generator places marker for river/lake source.

D. From every point marked in step C. using map from step 2 as base generator draws concentric rings that grow from that point untill they cone across other ring or barier(mountain tops or ocean) thus drawing river/lake basin (land area that provides rain water to said river or lake) checking how terrain is formed . Depending on terrain inclination around generator either draws a lake or river. Lake is drawn if terain slopes down into one point (or in other words it goes up in every direction from its source), lakes volume is added layer by layer and calculated using sum of humidity on basin area , if lake surface is higher than any point of its basin border surface level of that lake is lowered to the same Y level and said point becomes a source of new river. River is drawn on terrain where slope goes down in at least one direction and flows always with steapest decline if it comes to a point where in all directions terrain goes up that point is marked as new lake source. If lake (surface) touches ocean it becomes part of it , if river does it it just stop growing. If two lakes touch they merge if two rivers touch they continue as one if river touches a lake it stops and its basin is added to lakes basin to recalculate its volume. The process continous till all rivers and lakes came to stop. To ease up on computation we could place a limit on how far from lake or river generator draws theyr basin.

E. Using river paths and lake placement+shape , rock type , for rivers slope angle and volume for both (calculated from basin area humidity sum) generator make new topological map contaning only smplified shape of those rivers and lakes.

Ok here world wide pregeneration stops. Actuall world generation down to each block will use those maps (steps 2, 3, 4, A, B and E) as basis with sone additional noise , maps 2 and E for terrain shape and the rest for biomes, flora and fauna.

Pregeneration takes place when world is opened for the first time and leaves us with a crude map of whole world that later is used as guideline for actuall chunk generation (thats why it can be really low resolution its like cutting down a huge area of grass first using industrial size lawnmower and then finishing the edges with bush cutter).

Im writing this one on phone and work out more refined version later when i get time. Even so i will appreciate every comment especially those pointing out any errors in my logic or problems with my understanding of world generation and its limitations.

Ps. Please ignore errors in grammar and interpunction.

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • 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.