Open Teaser

Beyond Terrain Generation: Bringing Worlds in DWARF FORTRESS to Life

Alex J. Champandard on April 23, 2012

When you use traditional terrain generation algorithms, the results you get are mostly lifeless. Throwing in a few chicken here and there helps, but it doesn't give you that fascinating world to explore with its own history where everything you see has a reason.

In an interview broadcast live via on Sunday, Bay 12 Games' Tarn Adams talked about the details of the world generation in cult hit DWARF FORTRESS, ranging from the low-level elevation algorithms to the simulation of history that makes each world in the game uniquely full of life.

Fractal Landscapes

Early on in the broadcast, Adams explained how DWARF FORTRESS at the base uses a traditional fractal generation algorithm to create the terrain elevation information.

“The original implementation uses a mid-point displacement technique; that's how it's been for 7 years. I've been thinking about playing around with diamond-square algorithms but it's actually OK the way it is. [...] Once it finishes the fractal step, it applies a non-linear parabola so the mountains are bent to look more realistic.”

The quality of the terrains does not stem from the elevation data, but from the simulation that's performed afterwards...

Layers of Simulation

Screenshot 1: Different aspects of the simulation after the generation of the landscape fractal. Clockwise: vegetation data, good/evil map, coastal salinity and volcanic activity.

As Adams continues, he explains that what you see in the screenshots is the elevation once algorithms such as erosion have been applied. Other simulation steps include simulation of weather and rainfall, volcano and temperature models for desert creation, as well as coastal salinity — among other things.

Adding World Simulation

Screenshot 2: A log of historical events from the game.

What makes the worlds in DWARF FORTRESS come to life, however, is the sense of history. Maps have roads and villages for instance, which result from a trade simulation. Adams also explains that historical figures, simulated during creation.


Each of the algorithms or models in the game, taken on their own, might not be very complex when taken on their own. However, it's the combination of these systems that really makes the difference and that has captured the imagination of players. DWARF FORTRESS puts this philosophy to great effect everywhere, including while generating the world itself. The result is not just a terrain built from elevation data, but a map with a true sense of history that you can explore.

NOTE: In the remainder of the interview (see the replay here if you're a PREMIUM or ULTIMATE subscriber), Adams goes into the details of this history simulation as well as the underlying AI for the Dwarves.

Screenshot 3: A high resolution version of a world procedurally generated DWARF FORTRESS.

Discussion 0 Comments

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!