Tuesday, October 2, 2018

Swamps

In previous postings, I developed a “hachure" style of grassland marker:

Confusingly, the same marking is also often used to indicate a swamp, as in this map of the "Black Coast" by Cartographer's Guild mapmaker Diamond:
Another common swamp marking is a variant on these hash marks that adds a horizontal line at the bottom of the hash and mixes in some simple lines, as in this stylized example also from Diamond:
Here's a more hand-drawn look of this approach on the Tamriel from Misty Bee:
Obviously if you use these hash mark symbols for swamps, you can't also use them for grasslands, so on these maps grasslands either go unmarked or mapmakers invent some other symbol.

To create the basic swamp symbol, I can take the hachure I used for grasslands, bring the bottom of the individual grass blades together, and add a solid line underneath:
(Although these also look a little like sagebrush or some such to me.)  On my reference maps, these swamp symbols are mixed with simple lines.  I can do that by randomly drawing lines instead of the swamp symbols.  Here's an attempt:
This looks somewhat better, but there are too many lines.  The problem is that the lines don't take up much room on the map, so the routine that is filling the swamp area can pack in many more of the line symbols than the hachure ones.  To address that, I need to treat the line symbols as if they take up more room than they actually do.  (Oddly enough, the easiest way to do this was to draw an invisible cross-line on each of the lines.)
This looks more swampy.  My own mental picture of swamps includes bubbles of swamp gas rising up from the ground, so let me try adding some bubbles.
That seems to have some potential.  Some tweaking to add multiple bubbles, different sizes, etc:
Along with bubbles we might get fumes, which I'll indicate with rising curvy lines:
You might also notice some “popping" bubbles in there, although they're not super distinguishable at this scale.  Mixing these different options gives me a variety of swamp symbols.

In the examples above, I was actually marking grasslands as swamps, since that was the quickest way to test the new symbols.  But currently Dragons Abound doesn't actually create any swamp biomes on the map.  So I need to add that.

As it turns out, before I can add swamp to the map I need to fix a part of my biome generation.  The last step in biome generation is “smoothing."  Smoothing averages out the biome of each location based upon the biomes of its neighbors.  Without this step, biome generation produces splotchy biomes, particularly in areas that are on the edge of being either (say) grasslands or forests: 
A certain amount of splotchiness is interesting, but too much makes the map messy and eliminates the chance of having features like large, impenetrable forests or vast swaths of prairie.  Like everything in Dragons Abound the amount of smoothing is controllable, but typically I do some fairly aggressive smoothing:
Here you see a number of effects of the smoothing.  First, cities have ended up in different places due to the change in biomes.  Second, the holes inside the dark green forest have been eliminated.  And lastly, there's now an intermediate shade of green representing “deep grass".  All this happens because of the mathematical average between the biomes.  Forest is 4, deep grass is 3 and grass is 2, so when neighboring locations are averaged together the pockets of grass in the forest turn into more forest, and along the edges of forest and grass you get deep grass, and so on.

However, this only works if you have a very nice numerical progression of biomes.  A progression like “desert - grass - deep grass - forest - jungle" works pretty well, but where do you fit tundra or swamp into that progression?   You have to be careful that the average between two biomes makes sense.  If you (say) put swamp in the progression above jungle, swamp next to grass might average out to be forest, even though that would make no sense ecologically.  So it's probably best to get away from relying on a strict numerical progression of the biomes and mathematical averaging.

Instead, to smooth out the biomes I can set each biome to be the mode (most common choice) amongst itself and its neighbors.  So if I have a grass location surrounded by three forest and one grass locations, the mode will be forest.  With this sort of smoothing, if the map has swamp next to grass the smoothing won't introduce spurious forest at the edges.

Here's the map with a moderate amount of the new smoothing:
Note that no deep grass has been created between the forest and the grasslands.  I'll need to modify the biome generation to create that rather than relying on smoothing.  That's fairly straightforward, just adding deep grass between forest and grasslands:
This may be too much deep grass but that varies from map to map based upon the different generation choices.
(Here deep grass is being shown with green color and hachures.  Grass is not indicated.) 

Now that smoothing is fixed, I can move on to adding swamp biomes to the map.  Where should swamps appear on the map?  Well, according to Wikipedia:
swamp is a wetland that is forested.
And a wetland is:
wetland is a distinct ecosystem that is inundated by water, either permanently or seasonally, where oxygen-free processes prevail. [...]  There are four main kinds of wetlands – marshswampbog and fen (bogs and fens being types of mires).
By those definitions I think I really want to mark any wetlands, not worrying about the distinctions between marshes, swamps, bogs, etc.  Those occur in areas where there is lots of water, little slope (so that the water doesn't just flow away).  Most of the biome decisions are driven by precipitation and temperature, as in the typical Whittaker diagram:
But for swamp, when I say “wettest" area I'm talking about the amount of water flowing through that location, not the amount of precipitation falling in that location.  This is called the flux, and is used to determine where rivers are located.  I don't want to use just the flux in a location to decide if a location is a swamp, because then I'll just get swamps along every river.  So I'll look at the flux in a small radius around each location.  And the areas where there's a lot of slow-moving water on the ground will become swamps.

As a further refinement, if I want (say) 5% of the map to be swamp, I'll find 2.5% of locations using the above algorithm, and then I'll add another 2.5% of neighbors of those locations.  This will help avoid a situation where I get lots of tiny one or two location swamps scattered around the map, and instead give me clumps of swamp.

Here's an example:
The swamp here is at the confluence of two slow-moving rivers.  There's also a mostly-swampy island on the same map:
You might notice in the previous two images that there are cities in the swamp.  That's probably somewhat unrealistic.  It shouldn't be impossible to have a city in a swamp, but that's generally not a good location.  I'll add a slight penalty for swamps to the algorithm for placing cities:
And now the city is placed well outside the swamp.  This is controlled by a parameter, so on some maps cities may be much closer or even occasionally inside of swamps.  And when I add lizardmen (*) they'll probably prefer to live in the swamp.

(*) Of course I'm going to add lizardmen.  That was never a question.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.