Wednesday, May 1, 2019

Sand and swamps

It's been a little bit of a while since I last updated. This is partly because of real-life business, but mainly because I've been bogged down with trying to improve lakes, along the lines described in the previous post. The salt lakes are looking good but I want the freshwater lakes to work similarly - but I just can't get it to work, no matter how many nifty tweaks I make. Infuriating! Well, the existing lake system is OK most of the time, so I'll leave it in place for the time being, because I want to move on.

So enough of lakes - at least for now. Let's add some more new things.

First, ergs. Not the Jacob Rees-Mogg kind, fortunately. I mean the desert kind - large areas of sand dunes of the kind that we normally think of when we think of "deserts". In reality of course deserts vary in terrain type, and dunes cover only some parts of deserts. A large area of sand and dunes is an erg, and they form discrete areas in deserts such as the Sahara:


So let's put them in Undiscovered Worlds. This is pretty straightforward. We already did salt pans, which are also large, flat expanses of unusual terrain that occur in deserts. So all we have to do is to repurpose that code and do dunes in exactly the same way. The result:



Salt pans are lower than the surrounding area, because they're like lakes; this isn't the case with ergs, but otherwise they're functionally pretty much identical to salt pans other than the name, colour, and size/frequency (I've set it so these are more common and tend to be larger). There's no need to try to represent the dunes themselves because the scale is wrong - you wouldn't be able to see them at this scale. If I manage to create a local scale, more zoomed in than the regional, I'll have to find a way to make realistic dunes on these areas.

I think our deserts are looking pretty well stocked now. Time for something quite different: wetlands. These are areas that are not exactly lakes/rivers but not exactly solid land either, either because they are frequently flooded or because there is always standing water there. There are four kinds of wetland, distinguished mainly by vegetation type: swamp, marsh, bog, and fen. Swamps have trees in them, marshes have bushes or grass in them, and bogs and fens have small shrubs, grass, and moss, that turn into peat. (Fens tend to be fed by groundwater while bogs are more dependent on precipitation.) For our purposes, these distinctions don't really matter, at least for the time being. We'll treat them all simply as wetlands, but we will distinguish between freshwater, brackish, and saltwater wetlands, based on proximity to sea/salt lakes/salt pans.

We'll mark wetlands on the specials array. At the global level, it's just a matter of taking into account the following factors: proximity to water; level of precipitation; flatness of terrain; and what I'll call "drainage", following the example of Dwarf Fortress, but is really just another global-scale fractal to add some variation. The higher these factors, the more likely any cell is to be marked as wetlands. Also they are much more likely in tundra areas, because the frost melts in the summer and creates areas of standing water. If a wetlands cell is next to a salty cell of some kind it will be saltwater wetlands, and if it's two cells away it will be brackish; otherwise it will be freshwater.

That yields a world map something like this (wetlands marked in cyan just for the sake of clarity):


At the regional level, for any tile whose source cell is wetlands, we go through it and paste a blob of wetlands centred on each river, lake, or coastal cell. The elevation of each blob is taken from the elevation of the central point, to ensure that the wetlands remain roughly flat. This leads to what I think is a rather nice effect where wetlands cluster around the hydrological features but in quite a "bitty" sort of way. Here's what we get in a large riverine system in a rainforest climate:


For comparison, here is a map of the wetlands of the Amazon basin:


The look I've got isn't exactly the same, of course, but I think it's plausible enough to be getting on with. A little fiddling with the colours to make it all blend in and we get some nice subtle swampy areas like this:


We've also got quite a lot of wetlands in tundra areas, as noted above. Where these coincide with areas with lots of glacial lakes we get some pleasantly interesting looking landscapes:


So that's that. Onwards and upwards!

No comments:

Post a Comment