Welcome back! Development is going to start back up some time next week; I also intend to add a development plan to the blog very soon so everybody can see a) what I have left to do for the first alpha, and b) track progress across these. The current intention is for another fortnight of programming, followed by a break, and then a final ‘push’ from around approximately the middle of June to the first release.
In the mean time, to resume blog entries, I’ve had a few requests/questions about the exact map generation mechanics, so I thought I’d start off with an entry on those. If you want a gif of the full process, scroll to the bottom of the entry; otherwise, here’s each step with a little explanation. This was a map with all values (terrain, forest, tectonic activity, rivers etc) on ‘average’. As ever, click a picture to view full-size.
First, a rough outline of the continents and islands is created. The number of initial blocks is dependent upon the terrain value; the higher, the more initial landmasses are created. Some of the clumps of land generate in locations dependent upon previous land, while other areas are placed randomly.
Next, bands of terrain are added. I originally considered having a simulation which included things like rainfall, but then I realized that since I’m not creating the kind of ‘world simulation’ of the sort that DF is (i.e. factors of that sort are important for the player), there was actually no need. Instead, the game creates semi-random ‘bands’ of terrain, starting with tropical areas and then expanding to include desert, savannah, temperate areas, and then taiga/tundra/polar at the edge of the map. The final look of the map looks just as random and varied as a different technique, while this one saves on time and means I’m not adding any functionality into the game which won’t actually have an effect on gameplay (and, if it does one day, I’ll just add it in then). This also ensures that all climate zones should appear on any given map, which will be important for civilizations/species, and – I think – allows for greater variation on smaller landmasses and areas. Desert is ‘zigzagged’ around tropical areas, which ensures a different variation of desert across hemispheres (in this case predominantly in the south) whereas the earlier maps (if you go back and look) simply contain desert as a band above/below tropical.
After this, the landmass is then expanded and dithered significantly to remove the straight lines of the climate areas shown above. A lot of extra land is added in this stage. Subsequently, forests are added, with a regularity which depends upon the ‘Forest’ variable and different climate zones. Tropical areas get a ton of forest; temperate zones and taiga get some; desert gets very, very rare ‘forest’ areas, and these are actually oases. Also at this stage, one-square ocean areas are removed, since lakes function differently and will be added later in the process when rivers start to appear.
Next up: mountains. Mountain ranges are created, again primarily depending on the ‘Tectonic Activity’ variable but also varying a little according to biome. In the example below, there’s actually unusually few mountain ranges given the ‘average’ value I gave Tectonic Activity in this generation, but it’s still representative of the process. Once mountain ranges exist, they are then broadened, and the height of surrounding areas adjusted appropriately as the land is yanked upwards.
Lastly, volcanoes are added and then rivers are added and connected, all sourced from mountains and terminating in either lakes or the ocean. Both of these are tricky to see in this size, so I suggest zooming in to have a look. Rivers currently only generate from mountains, but I am considering allowing them to generate from high hills which aren’t mountains in the future too.
And, lastly, here’s a gif of the entire process. In a later version once territory and cities and things exist, I will do an equivalent to show how they (and creature settlements) are generated, but since terrain is the focus of the first alpha, I’ve only reflected that here. Next week, I’ll be uploading the development plan, and saying a little bit on each component of the first alpha I’m working on at the moment…