Andrew Ducker (andrewducker) wrote,
Andrew Ducker

How to build a world

The first overall goal of the world generator is to create enough information to produce a basic biome display. A lot of initial attempts at a world generator will start with things like "I need to lay down some forests, and some mountains, and some rivers, and some deserts..." and then when you end up with a jungle next to a desert, or a desert next to a swamp in an unlikely way, it's difficult to fix.

So the idea is to go down to basic elements. The biomes are not the basics, they arise, at least in DF, from several factors: temperature, rainfall, elevation, drainage. First, it uses midpoint displacement to make an elevation map.

It also makes a temperature map (biased by elevation and latitude) and a rainfall map (which it later biases with orographic precipitation, rain shadows, that sort of thing). The drainage map is just another fractal, with values from 0 to 100. So we can now query a square and get rainfall, temp, elevation and drainage data.

This is where the biome comes from. There's an additional vegetation field so it can alter the amount (from logging for example), and there's also a "savagery" and a "good/evil" field. So for instance, if rainfall is >=66/100 and drainage is less than 50, then you have a swamp.

I'd never realised that Dwarf Fortress was so complex. And then I read this interview. Sadly, I'm too shallow and time-poor to give it the kind of time and attention it deserves.

So instead I have From Dust pre-ordered, which is less intrinsically complex, but a damn sight prettier:

Original post on Dreamwidth - there are comments there.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened