Raining Facts, and Bugs
Okay, so people. People need food, water and shelter, and so tend to build shelter near sources of food and water. Agriculture needs water to produce food, and so we’re pretty much looking at water as a primary concern when placing settlements. So, I’ve been working on rainfall and rivers, as part of working on people.
Firstly, I did have a look on the web for some sensible pointers to why rain falls on a certain area, but unsurprisingly it’s rather complex. In order to come up with something realistic, I’d have to create thermal ocean currents and prevailing wind systems, tracking moist air to see where it is forced up over high ground.
I haven’t done that.
As a first approximation, I’ve simply related rainfall to the average height in the local area, so this map:

Produces this rainfall map (the more rain, the brighter):

It’s very simplistic, but it’s a separate process from everything else, and so I can improve it later without much hassle.
I can’t just use the rainfall value to dictate fertility, as that would make mountains the most fertile areas, which isn’t exactly right. I need to track the rain flowing down to the sea again, and in doing that I can create rivers and streams. The first step in this was meant to be relatively simple, but I managed to introduce a complete pig of a bug into the code that recurses down from the peak cells tracking flows downwards. It took me a couple of hours to find the problem, but the result is this flow layer (matching the above map):

It’s not quite rivers yet, but it’s close. I need to make the flows more sophisticated (currently the water only flows down one cell side rather than flowing to all lower cells) and to introduce some flow erosion. This should aggregate more flows, clarifying the picture and allowing me to pick out actual rivers for display. There’s also a case for defining some sort of ground permeability factor, but I’m not too sure about that as it would probably drag me into trying to simulate soil formation and clay and rock layers and all sorts of things I know nothing about.
Meteorological or geological tips are welcomed.

