Wednesday, January 7, 2015

Mapping Terrain Hexes


After completing the elevation map, temperature map, and moisture map, I'm ready to try and put these pieces together and determine terrain types for each hex on my dynamically generated fractal world.


Before tackling the terrain mapping, one aspect of the generated maps was bothering me.  They were too noisy.  Too many tiny island and lakes, more so than in natural world terrain.  I decided to apply two passes of a simple blur filter to the elevation map before the subsequent processing steps.  The results are more pleasing, but it's possible I might increase the number of blurs even more if the worlds still look too noisy.

Elevation Map with 2 Blur Passes
Terrain Mapping

I used the diagram below as a reference for mapping a point on the elevation map to a terrain.  First, I determine by the elevation if the hex is a flatland, hills, or mountain.  Then, I cross reference the temperature by the moisture to determine the appropriate terrain type.  For example, if it's a mountain hex, possible terrain types might be mountain, evergreen mountain, forested mountain, or jungle mountain.  I then made the tallest mountains on the maps into snow peaks, and threw in a minute chance of one or more volcanos popping up.

Terrain Mapping Results

Here's the example world above mapped to hexes.  The world is 768x300 hexes, or 230,400 total hexes.  I had to shrink the image quite a bit in order for blogger to accept it.  I like the shapes of the land masses, and the look of the mountain ranges.  If there's one thing I would tune, it would probably be to decrease the overall moisture level so more plains and shrub lands manifest.  But I think that the moisture control will be a tweakable dial in the final product, so you can create lush jungle worlds or barren desert worlds, as desired.

Since it's difficult to make out the individual hexes in this image, here's a section zoomed in.

What's Next?

I'm starting to consider how to populate the world with various fantasy races.  I'm leaning toward trying to model a simulated history.  Start by putting some primitive tribes on the map, let them advance and expand, and eventually come into contact and either ally or conflict, depending on their alignments.  As civilizations grow, settlements will spring into existence organically, and grow from villages to towns to cities, or might get razed by war and wind up as ruins.

But that's not immediately next in the development queue.  Next I'm going to integrate the other terrain types that haven't made an appearance yet, namely swamps and fungal forests.  Oh, and I almost forgot ... rivers.  And I might just start building those terrain hooks I talked about earlier, and throw some elemental portals into the mix to see how they mess up the climate and the resulting terrains.

No comments:

Post a Comment