Working on 2 more player settings, and then I will probably make Map Generator 3.0 thread.
The first setting deals with whether or not a plate becomes an ocean. A number of ways to do this. Could just make a % of all plates into oceans, but that randomness could leave you with very small plates for continents. Probably going to categorize the plates by size and ensure a couple of the big ones are the last to be made into oceans. This will also help me guarantee a certain number of oceans. If the player chooses a setting with 9 plates, they can choose a specific number of them to be ocean.
The second setting deals with the permeability of the tectonic boundaries regarding land. Ideally, you get a handful of continental land bridges similar to Central America and the Middle East in cases where you want a more Earth-like appearance. The problem is that it is hard to make a specific area permeable without making all boundaries permeable, which breaks up and otherwise blurs the nice coastal definition along the plate boundaries. It would be nice if I could procedurally figure out a good place to make these landbridges, but that will be almost impossible. Most likely going to have to rely on their spontaneous creation and give players room to play.
Thanks! It has been pretty satisfying to see how natural they are turning out. And it only took 7 new functions to make it happen. Sadly my lake/river system is more complicated than the tectonics.
Earthquakes, Tsunamis, the works. The natural side of the event system will also include Hurricanes, Meteors, etc.
To offer an observation I dont think that making the tectonics all water is a good idea, there will be times when continents have hit and the plates overlap on land so perhaps you can check the size of the continents and have a setting for some kind of joining/overlap to form super continents. Ofcoarse this does relate more to maps with larger solid landmasses and not archipelago/island type maps
Yeah, breaking the ocean barrier on the plates is one of the things I am working on. ~90% of all plate boundaries on Earth are surrounded by water. That is the standard, so for edge cases like India, the exception will have to be worked into that framework.
As you suggest, I should be able to pull a small plate, determine which neighbor plate it is smashing into, and then run a different seed on all boundary tiles the 2 share, perhaps even pushing mountain seeds a few tiles deep into one of the continents. That should turn out similar to the Indian Sub-Continent hitting Eurasia. I can also use it for Pangaea maps to have them all crushing together.
To work with that, I will add a setting that makes this more or less prevalent, as well as a couple other similar settings. In your standard Civ game you have World Age, which is how you determine mountain/hill quantity but it is pretty vague. As a player you generally have no clue what it is doing or why.
I will probably have 4 settings that allow you to control elevation:
Tectonic Activity: General tectonic edge mountain ranges(IE. West edge of the Americas). This will control how many Mountain seeds appear on the plate edges. The closer the landmass is to the plate edge, the more likely it will have mountains on it.
Tectonic Collision: Indian Sub-Continent type collision. The cases where a plate boundary results in a massive pileup of land and mountains instead of ocean.
Ancient Tectonics: Allow for mountain seeding outside of the most recent(100M year) tectonics. This will represent ancient tectonic activity, random volcanism, etc. Think Appalachians, Alps, Urals, etc.
World Age: Global erosion of existing mountains and hills. After tectonics has run its course, a % chance for mountains to turn into hills, and a % chance for hills to turn into plains. Maybe have a higher chance for erosion on the coast so you have those nice plains/hills on the coast with a vast mountain range backing it up.
Hoping Isthmus creation will work out with the setting that reduces the number of water seeds on the plate boundaries. Kind of a big hammer for a small problem though so I may need to work out something a little more local. Perhaps similar to the continent smashing, but less extreme.
Thats very interesting, I didnt actually know that but I figured a majority of the plates would be under the ocean I know where you are coming from with the Civ settings, Ive played those games to death since the first one and typically choose my own settings so I know how limiting they really are, especially in regard to the age setting. I think your ideas are certainly an improvement on that formula even if its complex, one thing that crossed my mind is cloud cover especially on the topic of mountains, that if you have disasters like tornados and whatnot it might be cool to have just regular weather cycles which cause rivers to fill up or dry out so the world actually ages with you as well unlike the Civ games
Yeah the players will have a wall of sliders to play with if they so choose(hopefully not more than 1 page ). I will probably hide that behind a fancy “Advanced Settings” button that is hidden in plain sight. Other than that, I will have lots of presets that move the sliders to predetermined positions, and should help players learn more about what each setting does(that and good tooltips).
Probably won’t mess with weather other than my event system Storm of The Century Hurricanes and whatnot. Maybe have some localized flooding and drought events that affect regions, rivers, etc but you would just have reduced farm yield, damage on those tiles, etc.
Climate is a different matter though. I intend on having Ice Ages, Global Warming, etc, but those are larger scale. Smaller scale climate change such as regional monsoon changes have destroyed civilization in the past. When I start work on the overall climate system I will have a better idea of how I can play with such localized changes.
There aren’t too many instances in recorded human history where major rivers/lakes/seas were altered enough to matter in a civ game. Aral and Dead Seas come to mind. It wouldn’t be too much trouble to replicate that. Altering rivers would be more of a pain, but doable. I don’t know of any major river(Mississippi, Tigris, etc) that has dried up in recorded history. Probably plenty of small rivers and streams, but I don’t represent those on the map anyway. If you know of some that I can research I would appreciate it.
Its really interesting to me that you’re really attempting to make the system organic, that was part of my issue with Civ is the world itself once its generated is reasonably static apart from the units/cities but as you say there are a lot of different things that have happened to the Earth in terms of Climate, I think having to work to actually sustain your civilization, by battling against the elements, is what Civ was missing that Alpha Centauri had that I liked, even in Alien Legacy you had to actually work to keep things running where Civ will happily plod along without too much human interference. I guess its more akin to a game like Simcity, that’s why I brought up rivers but I can understand that the scale is quite different and that didn’t actually cross my mind The main thing I was thinking was for flood plains where the extremes of both flood and drought can have a lot more impact, if you built a city close to a river for example and it swells that might cause flooding or even outbreaks of disease if the river doesn’t flow.
With weather related things, generally I don’t want these systems to be something the player feels compelled to micromanage. Droughts, floods, hurricanes, etc will be events that happen every so often to change up the rhythm, both for better and for worse. Maybe some things you can build or tech to research such as weather forecasting stations that might lessen the impact of such events. As with other things, players will be able to control event frequency and severity in the game setup screen.
I am thinking about having a global climate change meter that could tip either way into ice caps melting, or ice age. Volcanoes and meteors hit at the wrong time and you find yourself sliding into an ice age, or maybe your industrial revolution was about to melt the ice caps, so a volcanic eruption gives you much needed time to prepare for or prevent that catastrophe. Probably have map settings that let you set the natural rate of this change, what point in the ice age cycle the player starts(heading to ice age or heading to warming), or turn it off altogether. Such a climate meter may or may not be visible the whole game, and the climate may or may not change before the industrial revolution.
This bug has been killing me all day. Couldn’t figure it out in the event graph so I colored all the plates:
Looks like some tiles aren’t being added to a plate(the grey colorless tiles), which is creating the extra arrays I am seeing. I considered that but still didn’t see it in the 1-2 functions responsible. Hopefully I can quickly finish this thing off in the morning.
There may be a deep flaw in the way I am running this function though. I have an Array I call the “Open List” which I add one tile index to. Then, I ForEachLoop that array and in doing so add new indexes to the Open List. Theoretically this should happen before the next item in Open List is called, which it seems to do… but perhaps it doesn’t always succeed? Maybe it hits the end of the Open List before an item gets fully added and drops the loop? Anyone have any experience with something like this?
I am basically walking each plate, marking that plate as good, and ignoring it while I walk the next plate. I think some tiles may be getting lost in this process.
50x100 or 5000 tiles. Takes ~25 seconds to generate. 20,000 tiles take ~2.5 minutes. From memory this is roughly comparable to how long it takes huge maps in civilization to generate, but I haven’t been able to find anyone online that has laid those numbers out. When I play Beyond Earth in a couple weeks for “research” I will time some of the map gens for reference.
So immediately after getting back into the project this morning I found and fixed the bug that was leaving tiles out of the plates. My new distance check that takes world wrap into account incorrectly set the Y after a branch that was meant only to filter out X. Coming at it with a fresh brain seems to have a pretty high success rate.
Unfortunately, that wasn’t the extent of the problem. The problem now involves plates getting cut in two during plate generation. When this happens, extra arrays are created for each additional sub-plate and that is throwing a wrench into my plans.
I had a feeling this might happen, but was hoping that it wouldn’t.
Updated to 4.5. Not a whole lot that is relevant to me right now, but I figure it is best to catch bugs in small chunks than finding lots of them later by skipping updates. No hiccups with this upgrade, though unfortunately the iteration limit setting they added doesn’t seem to work. I did find out that playing it in standalone mode doesn’t call the limit, but it also doesn’t print to the output log, just to the screen…
Made quite a few bug fixes and fleshed out the tectonic generator into a couple more functions, mostly on the tile grouping side.
Made a system for the Ocean % Setting. Then remade that system. Probably going to remake it at least one more time. Right now it is a little too random in that you can end up with all large plates as oceans leaving only small islands for continents, or vice-versa.
Also need to fix all the Seed percentages because things are kind of out of whack right now. Finding a good balance between map sizes can be fairly difficult. Even though a map size is 4 times bigger than another, the increase in plates/seeds/etc is not necessarily 1 to 1.
I also separated the Sea Level Uniformity into a separate block for Seed planting. So sea level literally just makes continents bigger or smaller, and Uniformity plants Water Seeds throughout the continent which can be lakes on the low end, or turn the whole continent into small islands on the high end. Same idea with islands seeding into the ocean plates.
So I have the ocean setting working and set it up so that it would alternate plates to become oceans until it has reached the maximum number of oceans. Since I ordered the plate array largest to smallest, this means that I shouldn’t have generations where all the largest plates become oceans while continents are left to the small plates, or vice-versa.
Still somewhat trying to tweak the number of seeds per plate to line up with the Sea Level setting. Also trying to tweak the second layer of seeds which determines islands and lakes(with the Sea Level Uniformity setting). I seem to have a problem where Islands are unexpectedly large and unbroken where I would normally expect them to be distributed across the plate, or at least broken up by water if they did congregate. Since they are regularly forming large islands, something is going wrong somewhere.
It could be related to the below picture where you see a long tall island in one of the southern plates. This is clearly an ocean plate yet I have removed all land seeding from the ocean plates, so why is it there? Doesn’t seem to be growing from a break in the plate boundary. I don’t think it is coming over the pole, as these islands appear elsewhere too.
There are also cases of single lines of hexes that stretch for some random distance for no discernible reason, which you can see in one of the north oceans. Again, don’t know why any land made it into that plate, let along why it stretches in a straight line. They always stretch along the Y axis, but I haven’t been able to detect any flaws in any Y axis specific functions.
Nothing good comes from dividing by 0. Except for those unrelated bugs I cleaned up in my search for the cause of the mysterious islands.
Here is a generation with the intended island structure and population:
Map Settings(values range 1 through 9):
Tectonic Uniformity 3 (# of plates in the map. Scales to map size, from 1 plate to 1 plate per 200 tiles.)
Ocean Quantity 5 (# of plates to be Oceans. Level 2 is 12.5%, and 9 is 100%)
Sea Level 9 (# of Land Seeds in the Continents and # of Water Seeds in the Oceans. From 1 to 9 seeds per 50 tiles.)
Sea Level Uniformity 1 (# of Water Seeds in the Continents and # of Land Seeds in the Oceans. Level 9 turns continents and oceans into island groups. I will probably split this into 2 settings in the future.)
That about wraps it up for the major changes to what used to be the Sea Level generation.
Going forward, I will work on how tectonics affects map elevation/topology. Starting with plates crashing into one another(Himalayas), then simulate your average (recent) tectonic activity(Rockies, Andes, etc), then simulate ancient tectonic activity(Appalachians, Urals, etc), and finally a world age system that allows you to erode all that tectonic activity back down into plains and hills if you so choose.
Right now, mountains and hills randomly seed throughout the map which will be somewhat similar to how I will simulate ancient tectonic activity.
I may start Generator 3.0 thread this week. Going to see how the next leg of tectonic work fits into the current tectonic functions or if it will be all new work.