Map Generator 3.0 - Please Critique!

Love it when I immediately know the solution to a problem within 5 minutes of opening the editor. :smiley: Very empowering!

Again, Red is divergent which means water seeds spawn on both sides of the rift, and purple is convergent which means land spawns on continental side and water spawns on the ocean side. The blue as transform can spawn either water or land, 50/50.

Notice the nice little land bridge that formed between the middle continent and the small mid-western continent. That kind of spontaneous isthmus formation is one of the things I was hoping to see between adjacent continents using this system. Well really in this case there were 2 land bridges forming that Sea, but that works too. :slight_smile:

If you study a few of the other recently posted maps, you can see that they are all using the same tectonic, continental, and ocean seeds, so the only difference in this latest generation comes from the seeds that are spawning along the varying tectonic plate boundary types.

I am not sure how much more tweaking I will do to this current setup right now, other than perhaps reducing boundary seeds from 100% per tile to something player controlled. Also one minor bug I need to track down and squash but that shouldn’t take too long.

I may go with it for a while and keep an eye out for oddities while moving on to the mountain portion of the boundary seeding which will put mountain seeds along every convergent boundary. I feel like that should work pretty well on the first pass, but there may be cases where I need to extend the reach of those mountain ranges into a continent if I don’t see enough penetration beyond the coastlines. Then I will seed a few smaller mountain ranges around the map to resemble ancient tectonic activity. Then I will form hills around all the mountain ranges. Following that I will work on an erosion system that grinds some of the edge off the mountain ranges, especially on the coast for terrain resembling california, japan, korea, etc.

The land-bridges are a nice touch!

Eager to see what you accomplish with mountains!

They are almost bonus because I was thinking before that I would have to do something special just for the continental isthmuses. But actually, they are forming much the same way Central America formed, along a convergent tectonic boundary that is also astride 2 continental plates.

It will be pretty random though. Some games you might not have any, others you might have quite a few.

The player setting will likely allow you to alter the ratio between convergent and divergent boundaries. So more convergent would mean more isthmuses by default, assuming continents are next to each other.

I also just made it so that ocean-ocean plate boundaries are always divergent. It won’t make a difference right now, but there might be some uses for the distinction later on, and it generally fits the picture of a tectonic earth with all convergent boundaries including a continental plate.

And yeah, I am expecting the mountains to work out fairly well. I am figuring that they can mostly just form along the plate boundaries and then I can play with the Plains seeds to make them extend more or less into a continent. I can even do this on a per continent basis for a tight mountain formation such as South America, while also seeding a continent sprawling pile-up of rubble such as the Himalayas on another continent. Then put some erosion into them to both make them more natural, and round out some places for cities to settle. :slight_smile:

If it works out I won’t even have to seed hills. Seed the mountains, surround the ranges with hills, then erode everything down on some player controlled %.

No problem, happy to help.

Still working out some kinks in the boundary system, but I decided to drop a quick tectonic mountain seeder in:

Also changed the plate seed to get a gen with a better looking interaction between neighbors.

Greatly reduced the number of plains seeds so the mountains would grow into the continents a fair bit. Dropping more Plains Seeds into any given continental plate would cause the mountain ranges to hug the coasts much tighter, which I can do selectively.

As you can see, the boundaries where 2 plates are converging form large dense blocks of mountains, which I could also affect by seeding more plains on one side or the other. If you look at India on a tectonic map of earth, it is pretty flat on the Indian side of the boundary, and the Himalayas are pretty much all on the Eurasian plate.

So what I would do after this would be to spawn some other random mountain seeds around the world, make every land tile within 1-3 tiles of a mountain into hills, then do a couple passes of erosion over each mountain and hill that would grind some % down into hills and plains.

So the plate boundary system is mostly implemented, including the player setting that lets you choose the range from all convergent to all divergent.

These plate boundaries create all kinds of features that mirror the real Earth:
Western Americas where mountain ranges are being pushed up on a sharp edge of continental convergence
The Atlantic, where a divergent boundary has spread continents apart to form an ocean with generally smooth terrain on either side of the gap
Himalayas where a continental mashup has created mountains deep into Eurasia
Central America, where a chance lineup of convergent plates has created an isthmus between continents

One feature was missing. The convergent boundary in the Western/Northern Pacific and Eastern Indian ocean that has created island chains such as Japan, Philippines, Indonesia, Papua New Guinea, New Zealand, and the Aleutians. A similar feature is also responsible for the Mediterranean.

I split up the Convergent Boundary into one for continental mountain ranges, and one for coastal island chains:

Dark Purple is the new convergent boundary that creates island chains.

As you can see, the large continent in the South West is surrounded by this boundary and has islands forming off it’s coast. The old convergent boundary in the east is forming a large mountain rain from the continental collision. The divergent boundaries are providing separation between continents, similar to the Atlantic & Indian oceans(also similar to the water off Antarctica).

Still playing around with the details of how these spawn, and will probably create a setting to control the 2 convergent boundary types.

Also need to rework the Sea Level setting as it isn’t scaling very well. Previous generations showing the tectonic boundaries have had low sea levels which filled the plates up with the continents. The above image has a pretty high sea level but the plates have more land than I want in them for that level.

A higher sea level will make divergent oceans more pronounced as well as make for more coastal islands. A lower sea level will make divergent oceans very narrow and cover most island chains with land.

Can’t wait to start eroding these mountain ranges down. They are too monolithic the way things are currently handled. :stuck_out_tongue:

Keep butting into the 2 billion iteration limit. It was nice of them to add the setting, but a check box that removes the limit altogether would have also been nice. :slight_smile:

I probably need to carve out the river system and put it in it’s own blueprint, but don’t really want to take the time to do that when it is working perfectly fine right where it is. Probably just turn it off for now and move it when I start to optimize it following the new climate/weather system, which is some time(maybe months) away.

Anyway, added the Tectonic Activity Type setting that lets you choose the ratio of Convergent Continent(Himalaya) and Convergent Island(Indonesia, Japan, Mediterranean) plate boundaries.

Working on re-balancing the sea level seed, but I think I am going to have to put a little extra work into the divergent boundary. I am going to see about making a seed planter that puts water seeds anywhere from 1 tile to 6(maybe more, perhaps with some randomness in width) tiles away from the divergent boundary depending on the sea level. This will let me take pressure off random water seeding in the interior of the continents as a means of reducing their size when the sea level increases. It should also look more natural, which is the problem I am seeing around the middle of the sea level setting. High and Low settings look good, but intermediate(which is roughly where the Earth would be at) is proving hard to accomplish properly.

So I am having problems of depth and scale.

Problem: Seeding at the right depth for all occasions. If I seed 5 tiles deep from the boundary to make a continent resembling North America and the Rockies on large plate, the same situation could cover an entire continent with mountains on a smaller plate, or just be a small sliver on a huge plate.

Solution: Given all the factors that could affect the generation, each plate would have to work on a case by case basis. Make a seed profile for each different type of mountain or ocean that needs to be created(Rockies, Andes, Himalayas, etc). Then, for each seed profile, it would react to the plate size, the sea level, etc, etc. So for Andes mountain profile, it would almost always place mountain seeds 1 deep, but on very large plates it might increase to 2-3 tiles deep.

I don’t have directional control over the plate boundaries though. so when a convergent boundary doubles back or circles a continent it can create unintended consequences, such as a continent with all mountains. Erosion should help, but unless the player chooses very high erosion they are still going to have lots of mountains on the affected area. I don’t see that kind of circumstance as entirely impossible, but there will be cases where it won’t look natural compared to how people view the earth and it’s mountain ranges.

I may have to split continental map and island map into 2 distinct map creation options, each with different seed profiles. I knew I would have to do this for specific options such as maps that look very similar to the earth, or other specifically-shaped map types, but I was hoping I could cover most possibilities with the core generator. I am going to rebuild some neighbor checking algorithms and see if I can get varied boundary deep seeding to play nice.

Finally had enough focus to make some progress. Completed the neighbor checking algorithm that can reach out to any distance I require, and now I can make a few functions that use that for various purposes.

So below, the divergent boundary(red) seeds water 3 tiles away which you can see contrasted with the other side of the continent that is seeding island chains. That ocean in the middle of the picture is pretty much an analog to the atlantic. The big continent even resembles North America in general, so that is great. :slight_smile:

So using this I can maintain continental shape while still extending the ocean deep into a plate, from pretty much any or all sides. And it will be player driven so I can increase or decrease seed depth depending on the sea level setting.

I am also going to have to take into account the size of the plate because a plate with 1000 tiles is going to need a different depth than a plate with 100 tiles.

For convergent continental, it will be similar, except I may split it up into 3 different types of continental convergence which will generally only change how the mountains seed. South America for Shallow seed, North America for Average seed, and Himalaya for Deep seed.

Convergent island boundaries will receive a similar treatment except I will have to take a little more care into how the much water and land is seeded to ensure good island formation. Being able to seed at depth will give me much more control over island formation.

Really liking how these generations are turning out. Here is another generation like the above, but this time the western plate boundary is convergent continental:

Even more North America shaped than before, especially with that central america analog to the south eastern continent.

Currently trying to figure out why some of the tiles on a continental boundary are generating water when they should have a Land seed on top.

I split the convergent continental plate boundary into 3 separate boundary types so that I can vary the seed depth along those boundaries. Basically working, but now a few other areas need to be tweaked to compensate.

I may do the same to the convergent island plate boundary type, though that will take a little more work since I will be dropping multiple seed types using the same function. Probably work it out with just 1 boundary type and see if I need more.

Not sure if I will give the same treatment to the divergent boundaries. I think they will mostly vary based on sea level and plate size. On earth, most divergent boundaries are generally a uniform distance from the shorelines so I shouldn’t really need to account for differing seed depths there.

Once I get the boundaries where I want them I can start working on scaling to map size/plate size, more map settings, etc. I think I will also put some more work into making boundaries more tied to the plate they are on. Currently they kind of snake along randomly so sometimes a continent might be obliterated by divergent boundaries and other times made into an impenetrable mass of mountains.

So scaling the variable seed depth is pretty tricky. Plates can be just about any shape, which means I could be short on one continental plate and completely obliterate another with ocean. Plates that are about as wide as they are tall are ideal, while long skinny plates are a problem. Going by plate size alone won’t cut it.

I could try using plate width, though depending on which direction you are measuring that could be very short or very long if you are in a corner measuring out. Maybe if I measured in every direction(or at least 6) and then averaged it… Being in a corner would come up with a very low average, while being on the edge of a huge plate could give you a very high average. Then I could literally take a % of that average and make that the seed depth. Should allow a single sea level setting to scale to the tiniest of island plates and the largest of Pangaea continents.

Hopefully I have time on this long weekend to work it out. :slight_smile:

Tried using while loops, but that was more trouble than it was worth. :stuck_out_tongue: I could address the issues, but it would take a few extra actions in the loop to ensure the loop doesn’t go infinite(A WhileLoopWithBreak could be useful to allow breakage on executions as well as bools). Anyway, ForLoopWithBreak is fine as long as I set the last index high enough to cover any foreseeable map size.

Basically, from the current hex, I step out in each of the 6 hex directions counting tiles as I go. When I reach the next plate, the loop breaks, adds to the distance variable, and moves to the next direction. When all 6 are complete, I divide the value of the distance variable by 6 for the average.

The distance checking is giving me average distances that generally correspond to about half the closest plate width at the point of measurement which is pretty much ideal. I can multiply that distance by the Sea Level % and get a seed depth that matches the plate very well. There are a few cases where the number is much higher than the local plate width, but these are generally small pockets that are enclosed on 3 sides with 1 side being wide open to the rest of a huge plate. These pockets(if divergent) will end up being turned into ocean even with very low sea levels and that is fine.

I am thinking this distance averaging method should be useful in quite a few areas beyond plate boundary generation; climate systems, AI, etc.

The first image has a Sea Level setting at 1, and second is set to 5 (out of 9):

In the second image the sea level is a little higher than I expected for 50%, but that was easily corrected by increasing the number of land seeds found in the continents. If you look at the west-most equatorial continent, increasing the seed count increased it’s width from 3 to ~5 tiles which is pretty much on par for 50%.

So those images are without any convergent plate boundaries bulking up continent mass. If a player chooses a very high tectonic activity with a very high sea level, they aren’t going to have much water(other than plates designated as oceans) despite the high sea level. Another way to break up continents would be to use a low uniformity setting which would allow many more water seeds in each continental plate to break them up. Either way, the UI for the map creation screen will have it’s work cut out for it to relay this kind of information to the player. Lots of preset templates to be had for sure.

Hills now form around mountain ranges, and ancient tectonic activity is forming sporadically around the map.

And I colored the map in a topographical manner to better show this:

The only thing left to do with the tectonic boundaries would be to work out a better, more controllable method of generating them. Currently, the boundary snakes along as a specific type until it hits a spot where 3 or more plates meet, and it re-evaluates it’s boundary type. So sometimes it will continue on as the same type, and other times it will change. This generally does what I want it to do, but I have very little ability to control what boundary type goes where. Going to take some thought to come up with a better system. May move on and come back unless I can come up with a better idea this week.

A few other minor things to do such as vary and scale the hill formation and ancient tectonic activity, and I also want to apply my hill creation method to the coastal ocean tiles with a bit more randomization.

Once I work those things out, I can start working on the erosion system, which you will be able to set to do nothing, or to completely erode everything down to plains.

I love reading through this thread. Makes me want to play Civ, or better yet whatever this turns into. :slight_smile:

Unfortunately at this rate you probably have a year before there is even a basic playable prototype. :stuck_out_tongue: Though hopefully pathfinding doesn’t take nearly as long as the generator… Should be able to get at least some kind of combat mini-game going when I implement and iterate on basic AI movement.

Added some variation to the hill and coastal generation and scaled it to plate size and map size(every 5 map sizes the range increases by 1):

The depth functions have spots where I can easily plug in a setting for control over the depth of the coast and hill formations, which I may do in the future though probably not right now. There are a few other things I will probably want to play with as far as how random the variation is and some other minor things, but that can also wait.

Now for erosion, which in the first iteration will be primarily water based.

It will generally be % based depending on what conditions exist at each tile:

Coastal Tile = Very High Erosion
River Tile = High Erosion

Wet Precipitation = Moderate Erosion
Moderate Precipitation = Some Erosion
Semi-Arid & Arid Precipitation = Minute Erosion

Those factors also have to scale to the erosion setting, of which there will probably be 2; 1 for mountains and 1 for hills(in case you want to keep only hills or only mountains in a generation). At one end of the setting spectrum erosion will be 0, and at the other end 100%.

Looking to the future, I may or may not take into account wind erosion. That will largely depend on how the climate/weather system develops, which may or may not have wind/jet streams as a major factor.

Rethinking basing erosion on precipitation conditions. The precipitation that will exist in the final map generation is not the same precipitation that would have eroded down ancient mountains and hills. Taller mountain ranges don’t receive much precipitation due to their height anyway, so tectonic forces must break them down before they can be further worn away by weather effects.

Coasts will still have high erosion, but general erosion will depend on the player setting that will grind mountains down. This will basically represent time and/or the general rate of tectonic erosion since the last major tectonic collisions that created the mountain ranges.

I am also hesitant to give river tiles high erosion since 2 hex wide river valleys could pretty much dominate a continent’s width on smaller map sizes, and still be unrealistically wide even on large map sizes. I will have to play around with the rate to see how it looks.

Working on the ratio of coastal to normal erosion and also trying to get a feel for how many actual mountain peaks should be present in a given mountain range. Staring at topographical maps of earth doesn’t necessarily give you a good idea of how many mountain passes there are in a range, nor how sharp a lot of the gradients are. A high elevation plain looks pretty similar to nearby mountains in those maps.

There are a couple other problems related to the scale of the map(limits the amount of detail) and the limited number of height representations(plains, hills, and mountains).

Here is a pic with only the mountains eroded:

In order to get an appreciable number of mountain passes, the ranges had to be eroded quite a bit. This ratio is probably good enough for the setting, which is about the midway point for erosion. Coastal erosion will probably be pegged to the normal erosion, minus ~2(out of 9).

Will see how it looks when I add the hill erosion step.