I'm always fascinated by Dwarf Fortress whenever I cross paths with it, particularly from a technical architecture point of view. How did they architect the history simulation? How do they efficiently update everything on each tick? What is the game loop like?
If anyone has any resources or links to articles, either definitive from the DW developer, or conjecture based on exploration and research, I'd love to learn more about how DF works.
Edit: There's really a decent amount of stuff out there, they've been making the game for almost 20 years now. So here is a talk that tries to explain DF to an audience, and does talk a little about the simulation.
I adore DF and am one of those folks who enjoys playing, not just watching videos on youtube. If you do want to give it a go, make sure you find an "Intro to DF" type video and follow it. It's a big learning curve but I love the game so much, and knowing the story of it's creation over time makes me love it even more. It is truly a labor of love by two brothers who have chosen to make it their life's work.
I read the SO blog post and thought it was a pretty cool coincidence that Adams was talking about SplitMix64 when I had just recently given a talk about it. Then I scrolled down and saw the video of my talk.
There's another game like that that surprised me: Amazing Cultivation Simulator. I got this video ( https://youtube.com/watch?v=wJxM3POU92w ) recommended on youtube and I watched it start to end with my jaw dropping more every time a new mechanic was described. Before that I had thought that big systemic games were stuff like Zelda Breath of the Wild, Minecraft or Dward Fortress. But this simulator game is one I'd like to see the code of
Last time I checked they didn't do it particularly efficiently and avoiding "FPS death" was an important part of the lore: cap the number of dwarves, avoid flowing water, wall off unused parts of the mine to reduce costs of pathfinding, add pathfinding weights to tiles, etc.
There's not much published about the internals because the creators keep it to themselves.
Cats are the death of fortress. Dwarf fortress is an incredible game but you are right that it’s actually amusing the amount of weird things you know you should avoid or manage as a regular player.
Bah, put the kittens in a cage and release them upon unexpecting intruders. 50-60 kittens will tear a Kobold apart if you lock them all into a small room.
For the un-initiated: Yes, Dwarf Fortress is a brutal game.
As a Rimworld lover who couldn't quite get past the ASCII in Dwarf Fortress, I'm super excited for the upcoming release! Rimworld has been a blast and I've heard the two games have many similarities (with Rimworld maybe being a slightly more approachable game that's a bit shallower).
If you can stomach the adjustment period for ASCII I'd really recommend it. I think it does something a lot of modern games miss out on - it encourages imagination first. The information given to the player is extremely dense and easy to parse once you've adjusted and you're giving your brain a chance to try and play inside your own head. I've built a glorious six floor tavern (slowly) with engravings on every surface - even those not reachable by pathing, why? because I had an image of a tavern floor full of rowdy miners with opera boxes circling the room above them for dwarves of a more refined taste... in the end it's just a box you need to floor scroll to see on the screen but the carved pillars in the middle of the room - the enclaves for dwarves to, in hushed voices, discuss just how beautiful gold is - and the grand skylight in the middle of the ceiling casting a rainbow of different colored light on the ground below... that's awesome.
Dwarf fortress is the first thing since MUDing that's really scratched the imagination itch in quite that way and, as someone who has worked in game development themselves, I think it's something that is only possible if you keep to the lowest tech. If you use words or abstract symbols then each player will fill in the details themselves, usually in their head but sometimes in artwork (see Kruggsmash as an approachable example here[1]) which can be extremely fulfilling.
I hope to see the non-ASCII version work as a gateway drug to get more people into the imagination of what they're building. And I hope this didn't come off as ranty or judgemental - each person enjoys games in different ways... but low detail art has a way of really spurring the imagination on!
My favorite thing about the engravings (and statues and similar art) is that not only is it based on real dwarves, gods, etc. from the current game world, but you can commission pieces about specific dwarves and the artisans will commemorate battles or other milestone events that involved them.
In one of the last times I played, some invader had broken through my defenses and killed a couple of highly respected dwarves (one of whom was a skilled fighter), but finally came face to face with a young girl dwarf who confronted him in one of the dining halls and, though she lost a leg, managed to kill him (eventually recovering to grow up to be a skilled craftsdwarf). I had a some statues made of her, and most of them came out depicting the heroic deed in different levels of detail (so of course the best one was put up in that dining hall).
There's also a sort-of-exploit related to this, where if there's a stranger in your fortress whom you suspect of having a nefarious background, you can commission artwork of them and sometimes it will reveal malicious traits about them if you examine it. The artists always seem to have perfect knowledge of their subjects.
This is the key for me - DF is like Sim City or other building games (including Minecraft) - you have to be able to create your own goals. Sure, you can keep trying more and more difficult embark locations, but after awhile you'll have DF down well enough that you can survive 'indefinitely' on underground farms behind impenetrable walls.
So you begin to do other things, mega projects are a common one.
This is also one of the reasons I enjoy playing older games. 2D RPGs such as Baldur's Gate to me aren't detailed enough to fully depict the game world, therefore my imagination fills in the gaps. This leads to a significant part of the game being played in my head which I think can create more immersion sometimes than more photorealistics games would, though I'm not saying this is a general rule.
I played Cataclysm: Dark Days Ahead in ASCII long before I even looked at screenshots of the tiles. Worse than getting stuck with Ben Affleck in the movie of a book you loved. The Jabberwocky was in the screen shot I saw, the description gave such a spooky mental image, but now all I see in my head is the 8-bit swamp monster thingy, like something from the original Castlevania.
Clearly we need to feed DF generated descriptions to AI and generate tilesets for that /s
ASCII version will get the new UI Soon™
Personally I don't think the new look they're going with will be problem with imagination for me - the new look adds just enough detail that you can spot dwarf by their look alone but there is still plenty of space to imagine how exactly the described things look
I agree with the "encourages imagination" argument, and also that ASCII modes might be more practical. I have played Nethack in ASCII mode and tried a few graphical variants, and always returned to the ASCII version because it's easier to tell the enemies apart and easier to see what's going on.
I love ribworld as well! It's my most played game by far at this point. The mod ecosystem is simply outstanding. That being said, it doesn't even attempt to be the simulation engine that Dwarf Fortress does. It feels like DF is a simulation engine first, with emergent game play almost as a side effect. As much as I like DF, that simulation first development process can be felt during almost every interaction in the game. It's not so bad once you've committed everything to muscle memory, but the learning curve is no joke.
if you like these games you might also like Oxygen Not Included. It's side-on view instead of top down, but is another excellent little ant farm to sink a couple thousand hours into. Sort of a Rimworld meets Factorio type vibe.
It's such a sleeper compared to similar games. The art and sound effects really elevate it. Klei has such a unique art style and it's really shown off. Also has a much more interesting "survival" curve than most; you'll be presented with many many hours of challenges trying to get a sustainable base, without cheap tricks like ever-escalating interruptions based on quantitative progress (looking at you, Rimworld.)
I'm eager to try it again. I went deep on DF years ago, but its more modern competition ended up winning me over but sometimes I still long for that extra crunchy simulation. I'm hoping that the Steam version supports the Steam Workshop. That has been a game changer for me with mods on Rimworld.
I watched about 30 hours of Kruggsmash's narrations of his Dwarf Fortress runs on Youtube, hoping it would 'sell' me on DF. What happened instead is that I played way more Rimworld and Oxygen Not Included than I had been playing.
Most days I preferred ONI due having to go way out of your way to commit war crimes, whereas in Rimworld it's just clicking a couple buttons.
ASCII is not a problem, since there is ton of graphics packs.
But controls, controls are ridiculous. I can't just enjoy it.
And I play very hard games, indie games, Ultima Online which you need to script own things to play properly.
But DF is another beast.
The graphics version also did MASSIVE pass on every control.
Like, instead of going "select bed, make bedroom, repeat 40 times", you can just make rooms, put beds, doors, etc, then just select whole area and it will make a bedroom out of each of those rooms.
camera controls are normal WASD now, most of the things can be done with mouse, there are tabs on panels and hyperlinks in legend browser and thousand other little things.
It will be coming eventually to free ASCII version too
Just a heads up, if you purchase on itch.io rather than Steam, the devs receive a larger share of the revenue. (Though obviously it's not integrated into Steam, if you prefer that.)
Considering I've given them a few bucks a month for a decade and a bit now which doesn't even come close to the value I've gotten that is a great idea.
A hospital/illness scare made them realize they have nothing setup for illness/insurance and need a more secure source of income.
It's probably true that if word got out that Tarn or Zack needed medical care, the donations would flow like water, but it's understandable wanting to prepare.
As I recall he had some medical issues to pay for. The other brother didnt have insurance nor a regular income... just his split of the DF donation money.
It bring up a lot of criticism of healthcare in the US which I don't quite understand. Yes, healthcare is expensive in the US, especially without insurance. It has been for a while, so dont be surprised when not having a regular income nor insurance puts you in a bad spot. It was poor planning as much as it is expensive healthcare.
It basically amounts to one day realizing "oh shit, $35,000/year and no health insurance isn't enough money. This is the fault of the United States."
Even if it is bad planning, it's still a good illustration of why it's a bad system. If I step in a pothole because I was looking at my phone, it's true that I should have been looking where I was going, but the city should also fill the pothole.
Tbh in saner countries with public healthcare, even if you do something utterly stupid & injure yourself you will still receive medical care. The point of the system is that everyone can do stupid things or injure themselves another way & we never know when that's gonna happen.
It goes along with the whole "civilisation started when one human helped bind and heal the broken femur of another human", a quote which may or may not be able to be attributed to Margaret Mead.
The only thing that's usually considered otherwise is long-term stupid decisions such as smoking, etc.
Very briefly as a counter example - these folks made a thing that thousands maybe tens of thousands of people treasure. They've worked on it as a passion project and when ill luck befell them they had to scramble to secure funds. Yes, we live in a capitalist system but supporting neat art like this and exploratory projects is a societal investment that the US has stiffly refused to make. The more we provide social safety nets the more folks will be free to do experimental and artistic work and give us gems like dwarf fortress.
This isn't the fault of the United States - the US has made a choice in how the game works and they weren't playing by the rules laid out for them to follow. The expected course was for them to work in some job that robs them of their free time to produce a work of this caliber and if they had done so they'd be just fine... and we wouldn't have dwarf fortress.
This is the business model that they have chosen. Then they found it to was untenable so they chose a different business model. As part of that, they are addressing some of the largest weaknesses in the game. The game is not getting worse, it's getting better.
Beyond that, the United States doesn't owe people who make art in exchange for donations anything extra. We can argue about the merits of different healthcare systems but the point remains that they realized their plan was poor so they changed course - the United States inflicted no damage on them.
> Beyond that, the United States doesn't owe people who make art in exchange for donations anything extra.
Providing correct healthcare to all definitely is a duty of any modern rich country. If Cuba can manage it so should the US. You are trying to hide how poor your healthcare system is under a thin political veneer.
They used to personally make a crayon drawing for each person who donated. They stopped in 2020, but I made sure to get one of the final ones before then: http://www.bay12games.com/support.html
My $10 was a small price to pay for all the hours of fun I got. (I'll surely buy the Steam version too though.)
The technical complexity got me through a really tough time where I could hide in the world, ascii only on a pavilion convertible laptop. Good times, impenetrable gameplay.
Kitfox (the publisher) did a video with dev and someone new to DF [1] playing it for first time, while it might not be "pick up and go" yet it looked massively more approachable. There is even rudimentary tutorial to set up the basics and a bunch of guides.
Also most of the DF complexity comes organically during gameplay and not all at once - if all you do is set up food source and some bedrooms you already buy yourself a lot of time to fuck around. The discoverability of systems should also be much better
Is the UI getting an overhaul as well? I could probably deal with the ASCII, but I'm picky about UI design, and what I've heard about the interface sounds like it would make me have a tantrum and smash my menacing rhyolite cave sock.
Careful what you wish for. Some of the Dwarf Fortress endorphins are a product of the horrible user interface; asking for a more intuitive interface (at times) is like asking for an easier Soulsborne boss. Ask enough times and you have Horizon Forbidden West instead of Bloodborne.
Enh... In an action-y game, there's a strong argument that mastering difficult controls can be half the fun. In a menu-based management game, I want the controls to be as streamlined and intuitive as possible, always. It should be my knowledge and planning ability being tested, not my muscle memory.
Or to put it another way, if I'm pretending to manage a fortress, losing because I was too focused on expansion and didn't stock enough food and ammunition to survive a siege can be fun. Losing because I was fully prepared but forgot how to tell my minions to raise the drawbridge and man the walls is just frustrating.
I am excited for the graphics release as I have always been fascinated by Dwarf Fortress, but do not think I have the patience to learn how to parse the ASCII visuals.
Frontend UX developer perspective on DF: The ascii interface is actually fine and mostly a superficial complaint. The real problem is just how hard the many interfaces are to navigate and learn, and how unconventional their designs are. If I could pick one thing for the UI team to focus on: DF needs a “command palette” to help find/learn all of the game’s many functions.
It's genuinely terrible. I played enough to 'get it' at one point, then walked away for six months. When I came back had forgotten how to navigate the menus and just gave up, as it didn't seem worth it. Different kinds of branching per menu, different idioms for hotkey letters per menu.... just a mess.
I agree, but pretty much every UI has its own learning curve to get over, and taken together it’s just overwhelming to get started with. Curious to see how the tutorial system in the premium version helps address this. I’m cautiously hopeful but still doubt I will have the time to properly run a fortress. Maybe we’ll see the premium version lead to a jump in DF as a spectator sport given the much richer graphics library.
Time is what's been preventing me from getting into DF. Do I need to spend a significant amount of time on this game to get a good experience? Could I get away with, say, one hour once in a while? I'd probably need to invest time upfront to learn the basics though.
Last time I played I used Dwarf Therapist, and it definitely helps with min-maxing, but I've been thinking maybe min-maxing isn't the right way to play this game and I should just be happy with the in-game interface?
managing the labor is probably the least fun thing to do. dwarf therapist makes it better but even still I would love an algorithm that just manages it.
If you're using the Lazy Newb Pack, type "autolabor enable" into the dfhack window, you'll never have to think about it again. If you need to restrict jobs to the experts, there are easier ways to do it. For example, you create a crafting station that only your expert stonecrafters can use, then send all of your stonecrafting jobs to that single workstation.
Endlessly fiddling with Dwarf Therapist is not a rewarding use of anyone's time.
I think they're adding a similar feature to the premium release.
DF is like an old mainframe application; once you memorize the command layout you end up typing ahead of the UI almost. Still a pretty steep learning curve. Still amazes me that I remember so many of them every year or two when I get the urge to see the new things available. Modern Fun has made it challenging to fire and forget a very successful colony.
One of the things I love is that you can generate a world, play a fortress, eventually lose (it's fun!™) and then start another fortress in the same world, and your new fortress will have references to your old one - in the carvings, legends, etc.
I used to play a Minecraft mod called Better Than Wolves, which had a mechanic called Hardcore Spawn. The idea was that you would spawn randomly within a fairly large radius of the world spawn.
BTW made a lot of changes to the early game of Minecraft to make survival significantly more difficult, so you would wind up respawning often. At first this feels ridiculously unfair, but there's a magical thing that starts to happen the longer you play - you begin to stumble upon old bases, little caches of early game treasure (maybe just as simple as some tools or a few pieces of food).
Lots of the design of BTW was to encourage you to build - for example, certain materials like stone or packed dirt would make "roads", on which you would travel slightly faster (and critically, using up less hunger).
Over time, you would have a small network of hidey holes with roads or signposts leading back to larger bases. It gave your world a sense of history and was extremely rewarding over time - each death allowing you to claw out a small bit of advantage and control over the world.
BTW started out largely as a technology mod, letting you automate things and build better gear. So when these early game changes were introduced, they felt mean, and unnecessary, and frustrating. But anyone who could stick with it long enough would find themselves handsomely rewarded, both in in game power of creation and also in the experience of slowly conquering challenges through the things you built.
BTW's creator, who went by the handle FlowerChild, has long since left the mod community, but I remember him fondly. I learned a lot about game design from his posts outlining the decisions he made in designing the mod.
There is still a community around the mod, I think they've even carried on with the development. The period of my life where BTW was the thing for me is behind me, but I look back on it with a lot of good memories.
I played both Sevtech Ages and GTNH and the difficulty was definitely part of the fun - you feel real accomplished having moved past a laborious process.
One thing I want to jump into is the Adventurer mode! Nothing quite like the idea of building (and losing) several fortresses, and then going through them to explore as the "new generation". Haven't played DF yet, but it's very much on my list.
More than that. Artifact can be stolen from your fortress then you can go in adventure mode to track it down and steal it back. Well the "track down" part would probably be done in legends mode coz it would be hard to scour the whole world to find a single artifact but still
The thing that gets me about Dwarf Fortress is that it's a 64-bit text-mode game.
As a grey-haired developer who got excited about "DOS Extenders" that allowed 32-bit mode, seeing a text-mode game written as a native 64-bit application is bizarrely anachronistic.
I get a similar feeling from text-mode GUI frameworks for Rust, which allow multi-threading and 64-bit but are essentially clones of Borland Turbo Vision, where you had to be mindful to keep lists smaller than 64KB: https://github.com/gyscos/cursive
It's a modern game about hacking internals of an 8-bit computer by walking a single bit through it's memory.
Visually it looks like an ASCII roguelike game, but it's actually a niche puzzle game for people who like machine language, assembly and computer internals.
This deep and intricate world is inhabited by dumbest, most stubborn dwarves who throw players into depth of frustration, despair and a solid dose of hilarity.
The story of Boatmurdered[0] has given me a good go-to seed for other games with procedural generation. It's well worth the read if you have an afternoon.
Krugg gives due reverence to the generated descriptions of his dwarves and their world and incorporates them into his emergent storytelling and illustration in a very elegant way.
I'm so happy seeing DF reach a larger audience with the Steam release, it's been such a joy to experiment with over the years, and I feel like Zach and Tarn deserve a lot more recognition.
If you're interested in playing a new game in this genre, I've been developing a city builder game over the last year, heavily inspired by Dwarf Fortress, Rim World, Cities: Skylines, Sim City, etc.
My game will have more granular demand (not just vague "you need more commercial zones"). The player will see the interior of buildings and will be able to watch their sims live their lives.
Im working on getting version 0.2 release by Q1 2023. The game is isometric now! Working on releasing a new vlog to show it off.
I developed a new path finding algorithm to build big cities. Here's an old version of the game path finding 1,000,000 units to their own unique destinations:
What is more spectacular than even the Dwarf Fortress itself (and it is), are the C++ reverse-engineering tools developed in Common Lisp back in 2010-s. DFHack and Dwarf Therapist were rebased on top of them.
Titles need to be short, and relevant to the content. I took words straight from the Features section.
Now, because with all the talk about AI agents I was thinking about the environments, and that's when I remembered this. It very much can be inspiring, even if it's not strictly relevant technology-wise.
I understand but I don't think the title is very representative of the game. Regardless, Dwarf Fortress gets posted here a lot so I definitely think it's relevant: https://hn.algolia.com/?q=dwarf+fortress
It's actually not bad game to have running on second screen and just poke at it from time to time as your dwarves are working and building stuff. Kinda perfect "podcast game"
I've tried playing and actually getting into this game a few times (including installing tile packs, walkthrough saves and what not), but the game mechanics are obtuse and have such a high learning curve that frustration is easier found than any sense of enjoyment. For a game focused on being so meticulous and extra-vagant in its mechanics, it's sad that enjoying it or "having fun" seems something completely out of reach with hours of gameplay, reading third-party wikis and starter guides.
I want to get into this, but the randomly generated nature has always been an (irrational?) turn-off. I guess I want more editorial choice in the level design.
And you can post a world on the forums and ask people for a "good embark spot" and they'll find different ones for you.
It's amusing what people consider "necessities" and "absolutely not" in embark spots; some people will never touch an aquifer, others it's not even something to look at.
TLDR: Code was added that allowed substances to accumulate on fur. Cats lick their fur to clean themselves. Due to the calculation used for intoxication and body weight, cats kept getting lethally drunk from walking through spilled beer and licking it off of their feet.
This level of detail leads to tons of emergent game play and stories.
> fish and all other creatures are coded similar to Dwarfs for level progression, so training a skill not only improves the skill but also the relevant physical stats. Well, Carps have swimming as a skill. And they are always swimming. So within minutes of spawning every carp was a dwarf-sized mass of angry muscle and razor sharp teeth.
Haha lol. I maybe still have a screenshot of a Forgotten Beast killing himself by kicking up a dead cat's tooth (the cat was killed by some previous FB) (and the tooth deals a fatality).
Yeah there were pretty interesting edge cases with calculations. Like, for example, there is still [1] a bug for a whip doing unreasonable amount of damage in some cases because armour penetration logic was pretty much strength/area = penetration power.
And because whip hit only with tiny end, it pretty much went thru any armour
Decided to read the whole thing. For some reason the very last line where they make sure that you know that they have the color black included, twice, is hilarious to me.
There's probably some reason for it though? Anyone know?
Has anyone actually played this? Like, really played it. I've tried a couple of times and never got that far. I'm in awe from one perspective, but not entirely sure what of, from another.
Yes. It is not really that hard, if you consider how they have probably the best wiki of any computer game and a lot of high quality helper programs. If you alt-tab between dwarf fortress, the wiki and dwarf therapist, it is totally doable. And once you play a couple of games you start to get the internal logic of DF and becomes kind of fun.
Nearly a decade ago I played it a bit over a couple of months. I'd guess 30 hours or so (which is a lot for me, I'm a gaming dabbler, aside from the civ and fromsoft games). It was pretty playable IMO, and would really pull you in, just tedious to navigate the menus.
I eventually got kind of tired of investing so much effort into a fortress that would just randomly fall apart. People say that's part of the fun but I dunno... I found that aspect a bit annoying. It also ran really poorly for me in late game and that kind of put me off too.
Great concept, the ascii is less of a problem than you'd think, but overall just a bit too much effort to keep wanting to come back for more.
Yes. Once it clicked it was so engrossing I found I could think of nothing else. Focusing on work was difficult. Dwarf Therapist became indispensable. I knew all of my dwarfs by name, and I had a plan for all of them. My focus became all consuming. I built a windowed tower that could only be comprehensible if you grokked the Z-layer system. I was very close to having a moat filled with lava. In the end, I dug too deep.
I don't allow myself to play DF any more. It's just too good.
Steam version with better UI and graphics released 6th December
I did "actually played it", think the biggest thing I did was a lava cannon that flooded the area aboveground when invasion game, that was "interesting" build...
Having to relearn everything on interface stopped me from picking it up again, and from what I watched new UI look so much more user friendly
I've lost more hours than I care to count to this game--it's incredibly compelling to a certain type of gamer. Unfortunately (or fortunately for my productivity), there was a military update a few years ago that I found unmanageable, and my attempts to play it have been short-lived ever since.
If anyone has any resources or links to articles, either definitive from the DW developer, or conjecture based on exploration and research, I'd love to learn more about how DF works.