Hi everyone! My name is Artem. I started playing Dwarf Fortress about 10 years ago and still play it from time to time. It's a facinating game in many aspects and I wanted to say thank you to the creator and this awesome community.
There is one thing I have been wondering about recently. Its not about the gameplay, but rather about the game itself. I didn't know where to ask this question and didn't find any forum topic for questions like this so I'll ask it here. I hope it's okay. I also have to apologize for my English.
Recently I became interested in the world generation aspect of this game. I have always liked how this game can re-create any world exactly the same each time if you use the same seed values over and over. I read about procedural generated worlds, about different ways to do this kind of stuff, and the complex approach Dwarf Fortress use. Mostly, I got the info from a couple of interviews with Toady that are exist in the web (like
this, and
this). I know that DF generates worlds by doing a robust work on randomization and simulation things like tectonic plates, mountains, temperature, drainage, rainfalls and so on.
What I don't understand is on what level of abstraction Dwarf Fortress operates the world when generating it? Most articles and information on the internet which cover procedural world generation view this "world generation" thing as just "lets generate a 2D map in several dimensions, some of them are: elevation, temperature, etc." And the map in these cases is usually not that big and the smallest "tile" in these algorithms is usually a very large area in the resulting world.
But as far as I can understand, in Dwarf Fortress things are a bit different. We know that at the generation step world can be looked upon as a map with a certain size (for example, 65x65 for the small size world). We see this map on the world generation screen. Each tile there (let's call them region tiles) represents a 16x16 local area blocks of 48x48 real-game tiles each (these are the tiles we see in the fortress/adventure mode) (
source). So in total the small region would contain (65 * 16 * 48)^2 = 2492006400 real-game tiles for the small world! It's a huge amount, isn't it? And it is only covers one Z-dimension, but I also can imagine that there's some world generation work below the surface (at least for the caverns). I would say it is impossible to generate and simulate a world of this size without consuming a lot of memory and time.
So the question is, does the game really generate the world tile by tile using the smallest real-game tile as the smallest part of it's grid? Or it uses some kind of approximation and just operates region tiles at the world generation step? And if that is the case, at which step does it generate real-game tiles for each region tile?