Map Generator 2.0 - Please Critique!

Implemented Sea Ice:

Jungles also spawn over Marshes in Tropical and Sub Tropical climates.

I’ve been following this thread for awhile, very impressive. I’d love to play Civ with some of these maps, and I’m eager to see what you end up using them for.

It will basically be Civ, but my take on it. Hard to explain the key differences especially since everything is subject to change until it is fully implemented. Obviously a more in-depth map generator with far more map creation options. A similar yet very different combat system. More emphasis on resources. Reworked production system that implements Energy in addition to Production. Less emphasis on tile production and more emphasis on population and land use. Less of a city manager and more of an empire manager. Shared research(think the wheel, writing, etc), but individual development(think roman cement, ironclads, stealth aircraft, etc). No workers for tile improvements; instead public works similar to call to power. Are more advanced economic and trade system. It will go at least 1 era into the future further than Civ generally does. I intend to implement an event system that brings natural disasters, plagues, and even beneficial events, which of course will be manageable in the map settings.

Diplomacy/AI/etc will be as good as I can make them. This is the bane of all such games anyway so I expect it to be the hardest thing to implement properly.

Anyway, tons of systems.

So with all of this, I intend to keep it as simple as I possibly can. I may make one system simpler in order to make another more complex. Generally things will be more complex, but I don’t want to get anywhere near complexity that you see in Paradox games. I can’t wait to start work on those systems! :slight_smile:

Upgrading and optimizing the core terrain generators in preparation for upgrading the Seed generators. A process that used to take 4 minutes on a 20,000 tile map now takes ~15 seconds. Pretty sweet. :slight_smile: Should get the 200x100 map gen time down to around 5 minutes. Hopefully I can wrap that up tomorrow night and then see if I can improve the processes that now take up the bulk of the generation time.

Completed optimization of the core generator. Huge reduction in generation times on the largest maps. 60x120 generates in 35 seconds and 100x200 generates in 135 seconds which is an 80-90% reduction in gen time on those map sizes. I will post a more detailed explanation when I create Map Gen 3.0 thread, but basically each tile only searches 3 tiles away for seeds instead of all the seeds in the map. This didn’t matter for 10x20 and 20x40 maps, but when you are running 20,000 tiles against thousands of seeds, it takes some time. I may have to increase search depth to 4-6 tiles away for better generations but we will see. Of the 2 minutes it takes to generate a gigantic map, 30 seconds of that is river gen so there may be some work to do there. Also it took 42 seconds for the generator to even begin working, so that may be a result of the size of my map generator blueprint which is now at 12MB. I will break it up either when it becomes untenable, or I whenever I am ready to move beyond the map.

So anyway, here is a picture of a 100x200 map, and some odd visual artifacting as I zoomed ever further out. The glare around the edge would mostly go away if I stopped zooming, but the artifacts that look linked to the resources somehow. I assume that is the editor performing nuclear war on my video card because of all the tiles and trees being rendered(each forest has 37 individual tree instances on it, so that is an area waiting for future optimization). I have never seen this on smaller maps.

If any of you have another idea as to what is causing this though, let me know.

On another note, these generations remind anyone else of the Cosmic Microwave Background Radiation? :slight_smile:

Sounds like you’ve made some good progress!

Image isn’t very high resolution though. :stuck_out_tongue:

Indeed! Vacation and holidays are coming up over the next few months too, so hopefully I get some solid blocks of time to knock things out. :slight_smile:

I think you can see a bigger version if you go directly to the photobucket link and find it on the site.

The fuzz is green with this gen. Only thing that changed with the map is more water.

So I am finally beginning to work on the tectonic generator. Here is how it will go:

The player will choose how many oceans and continents they want. This will determine how many tectonic plates are seeded into the world. So for Earth, that would be 1 Oceanic Plate(Pacific), and 6 Continental Plates(North & South America, Africa, Eurasia, Australia, and Antarctica). A seed for each ocean and continent will grow and generate a tectonic plate map, with each tile knowing what plate it is on and that plate’s type. I may also assign each plate a designator that says whether it is subduction or collision, and also a direction, which would influence mountain ranges and perhaps tectonic activity at the plate boundaries. I may not need that extra information to do what I want, so we will see.

Once each tile belongs to a plate, I can then determine which tiles are on plate boundaries. This will be important since I will drop Water seeds on some % of the boundary tiles, which should provide the continental definition that you see in a world map(as well as all the oceans besides the Pacific). Land and Water seeds will be dispersed throughout the plate depending on the plate type and the player chosen Sea Level setting. This will probably take some significant fine tuning to ensure contiguous continents are formed when using earth-similar conditions.

So using a single Seed for each plate isn’t going to work, especially on the bigger maps. And it was looking so simple and elegant too… :stuck_out_tongue:

Here is an image of plates that have generated but do not affect terrain formation:

The terrain would probably actually look alright since the land seeds would be randomly distributed inside each plate(an grow from there), but I would rather get the plates looking as organic looking as possible from the get go.

I am going to have to work out a system that uses multiple seeds.

The problem with multiple seeds is keeping them generally clustered together since otherwise plates will try to overlap. That might require me to roughly pre-position the seeds in certain areas of the map, which I was hoping to avoid on the random generator. If you are trying to mimic the earth, that is actually advantageous since I can fine tune how the plates form, but for more randomized distribution I am not always going to want a globe spanning antarctic plate as you see on earth. So, I need to get it as random as possible first, and then for more fine tuned map generations I can just tell the seeds where to drop. Any map gen that has specific settings such as Terra(Earth-like), X Continents, Inland Sea, etc will have roughly preset seeds that cause specific conditions to occur.

So I think for the Random Tectonic Generator, players will not be able to choose the exact number of oceans and continents since I won’t be able to guarantee they get a specific number. Instead they will choose from a range similar to the other settings. They will choose the ratio between Oceanic and Continental plates, and then they will choose the Uniformity which will range between more and less plates.

Edit: Mmm, maybe I will use those plates and generate a second set of Seeds inside of them, and then the true plates would form from them. That would be a good way to Box the seeds in while keeping the plates randomly located and shaped.

If only I had infinite vacation days(with employment :p):

Still some fine tuning and bug fixing to do, but I should be able to form the land to the plates soon. Then I can work on mountain ranges on plate boundaries.

Amazing :slight_smile: I cant get over how many tiles there are there. Those tectonics look great :cool:

Thanks. :slight_smile:

It seems like every time I feel like my neighbor checking system is working, I find out that it has been horribly flawed all along. :mad: Going to need to upgrade these systems yet again. Was trying to be clever and efficient with variable use, but now I will just have variables that set for each direction and state yes or no whether you can check that direction.

Once I work that mess out, I can finish upgrading generator to check distances across the world wrap. Hopefully that part isn’t working because of some flawed neighbor checking.

Got distance checking to work with the world wrap. The top image is with world wrap, and the bottom image shows the 5 nodes that the top image replaces. It used to be much simpler, but the new method only adds 10-15 seconds on a map gen that took 130 seconds before. Not too bad.

Now on to seeding continents on those plates! :slight_smile:

Given the new tectonics, I am going to have to work out a new method of determining sea level. The current method is too noisy and generally destroys any continental semblance that the tectonic plates are working into the map.

I will keep the current method of sea level tweaking as a way for the player to break continental maps into island and archipelago maps. It will stand as the Uniformity setting for the sea level.

What I will likely end up doing is taking the tectonic plate boundaries, and expanding them outward to grow the oceans. So a map with very low sea level will have large landmasses that are separated by little to no water along the plate boundaries. A map with semi-high sea level will look more like the Earth with plate boundaries that look like the Atlantic Ocean. One common feature of Tectonic Plate boundaries is that they almost always have water above and around them. Part of Siberia and India being the 2 primary exceptions.

The challenge will be in growing the plate boundaries out in a non-uniform manner in certain cases. A fat ocean buffer on one side of the plate, and perhaps non-existent on another side(look at Africa on a tectonic map).

Actually, let me see if I can better tailor the seed quantities. I redid some math and realized I am putting more seeds than I thought in each plate. I will run some generations and fine tune to a single map size and see how it goes.

Not too bad:

A lot of problems with scaling to map sizes and the current range of map settings though, so that is going to need some work.

I still foresee a problem trying to scale the sea level while keeping continents generally together in one piece. Right now, raising the sea level means raising the number of water seeds which chops the continents up into swiss cheese. I will see if I can work it out so that raising sea level simply lowers the land seed quantities.

I have a method of placing water seeds all over the plate boundaries so hopefully that will be enough to shrink the continents while keeping their form. I plan on making this a setting as well where raising or lowering the boundary seeds will allow players to generally influence land bridges creation between continents similar to Central America, the Middle East, etc.

I have implemented a Tectonic Uniformity map setting that properly scales the number of allowable plates to the map size. With a setting of 1 you effectively have no plates. A setting of 2 is Pangaea assuming 1 of the 2 plates is ocean, otherwise you have 2 Pangaea.

Setting 3 through 9 scales to the map’s maximum number of plates. Map size 10 has a max of 5 plates. Map size 100 has a max of 50, shown below:

As you can see on Setting 9 you have a Large Islands map.

Of course, you could use a Pangaea setting and then alter the Sea Level Uniformity and get lots of small islands scattered around the plate that Pangea would have been on.

The player will have enormous control over map conditions. In order to reduce that complexity, there will be various presets that will set all the sliders for you with predefined options such as “Pangaea”, “Large Islands”, “Terra”, etc, etc.

Massive Multiplayer Super Settlers of Catan confirmed? :stuck_out_tongue:

Looks cool. later it would be interesting if blending could be done between the hex, but that has nothing to do with generating the data. I assume it’s quite easy to query each hex some one wants too/need to.

What I mean, is there an obvious split between the data and graphical representation?

Hadn’t even thought of making a Catan-like game. Sounds fun. Maybe as a side project in the distant future. :slight_smile:

Graphical niceties I am generally leaving to the future. Still not sure how I will handle tile boundaries. There are some pretty cool dual material effects in the content examples that I would like to try if not too GPU taxing. Perhaps the simplest method would be to use decals on the edges to bleed vegetation and other things. Actually, if I had proper UVs set on my textures the edges would fit together much better. Either way I will work out some method for smooth tile transitions.

Yeah, all tile data is kept on a series of arrays that are indexed in a specific way. Index 0 is the bottom right hex for every array that holds map info. There is a screenshot of the spreadsheet in the first post.

Right now I have a line trace set up on right click that hits the collision volume, gets the index of that volume, and then I can use that index for anything. Right now it is set up to chop a tile’s trees down. At some point I will use UMG for that interaction, but for now right clicking is all I need. The overlay you see in the tectonic images is just the collision volumes that I am making visible and coloring to show the plate boundaries.