Skip to main content

Breaking a 16-year-old tradition in Dwarf Fortress

For almost two decades, there was only one programmer working on Dwarf Fortress. Now, following a big launch on Steam and Itch.io, that’s finally changed.

Share this story

Key art for Dwarf Fortress.
Image: Kitfox Games

The much-anticipated Steam and Itch.io version of Dwarf Fortress was announced in 2019, and brothers Tarn and Zach Adams kept working on the game until its release last December. But it was exactly two years after the original announcement that Putnam — a developer who has been involved in the community for around 10 years now working on popular mods and reverse engineering the game — sent Tarn a decisive email.

“We knew just from our Steam wish list numbers that our game was going to do pretty well,” says Tarn in a Zoom call as he searches for Putnam’s email in his inbox. “Then we asked ourselves: ‘do we want to bring someone else?’ It wasn’t even something we could consider before in a normal capacity.”

Around the beginning of 2022, the team started to publicly discuss the possibility of hiring a new programmer during interviews. Before then, Tarn says that one option was to open source the game. But after seeing the wish list numbers increase over time — culminating in over a million during the month of release — they thought they could keep the source code closed up and share it with a new team member instead.

“I was having a bad day or something and just rambled about how having another programmer might take time away from the game or even make it less their product,” Putnam says, “and that seemed unfortunate to me. I rambled about that for a while, and then I thought, but also, if you’re going to hire a programmer, I’m an option. Huh. That’s how I ended that, and that part seemed to have stuck, so that’s good,” she adds in laughter.

One of Putnam’s biggest early goals was to make it as painless as possible for her to be working on this game out of respect for what Dwarf Fortress is, both as a game and as the result of the peculiar work dynamic of the Adams brothers over so many years. Yet, she was confident that she would be up to the task. After all, she discovered the project back in her high school years as she searched for something that wasn’t immediately recognizable as a game and which could fit on a thumbnail for her to slack off after she finished her math and typing class assignments. The ASCII graphics of the classic version were perfect for this.

A screenshot of the video game Dwarf Fortress.
Dwarf Fortress.
Image: Kitfox Games

The programmer, who is almost 28 years old now, first began playing Adventure mode. Over time, she began toying with the modding system, which seemed a bit limited for some of the ideas she had in mind. Using external tools allowed her to hack the memory of the game and opened the room to more possibilities.

“It stopped being ‘how can I do what I want to in this system?’ and more ‘how can I do what nobody else has done yet in this system?’” Putnam says. She had around a year or two of programming experience by the time she started doing mods, and it has become her career since. “I kept trying to find: ‘can I do this? Yeah, turns out I can.’ And it kept happening over and over again. And I got really into that, and in the process, I happened to learn a lot more about the game than most people ever learned.”

It’s been around a month since the second programmer joined Bay 12 Games. For Tarn, this is an unprecedented event, breaking a 16-year-old tradition of being the sole person working in the Dwarf Fortress code. It comes as the game is now more popular than ever — it sold almost half a million copies in December, and it’s currently sitting at an “Overwhelmingly Positive” rating on Steam, with over 17,000 reviews by the time of publication.

“There are some really gnarly things that we haven’t had to go through yet”

“Overwhelming is about the right word, I guess, because I am technically overwhelmed,” Tarn tells me. “We haven’t fixed as much as I would have liked by now, and that’s not anybody’s fault. There’s just too much going on. Having me as the person that’s doing all this media stuff, and also doing the programming up until three weeks ago, it wasn’t something that was going to lead to a lot of patches. That’s just not how it was going to be. But now, I got a lot of nice fixes coming up, and that’s all Putnam.”

There hasn’t been much of an onboarding process. Contrary to what I initially thought, Putnam didn’t receive a beginner’s guide to understanding Tarn’s code — she picked most of it up from disassembling the game during her modding years. Before Tarn knew it, Putnam was already taking care of what he says is a long to-do list of bugs to tackle.

A screenshot from the video game Dwarf Fortress.
Dwarf Fortress.
Image: Kitfox Games

Now, Putnam has access to the source code and is able to go through stuff on her own. The team has set up a version control system — which allows programmers to easily set up different branches to record changes separately from each other — and is currently working on Simple DirectMedia Layer 2, which is an upgrade to the current version in preparation for the Linux and Mac ports.

Tarn admits that while Putnam hasn’t had many problems understanding the code, there definitely are some bits and pieces that will require time to parse through. “I haven’t seen some things for 10 years. So I have some remarks in there that are now helpful for the other person as well. But there are some really gnarly things that we haven’t had to go through yet. We haven’t got into some of the map generation code that is just kind of disgusting,” he laughs. “But of the things that [Putnam has] looked at so far, there hasn’t been a lot of trouble.”

“It’s a miracle that it runs better than The Sims 3.”

Getting to the point of understanding Dwarf Fortress’ logic, especially with how many intertwining calculations are running in the background at all times, was a process that took Putnam a long time. Even as an active member of the community, she doesn’t think that anyone really knows how everything interacts. But if someone fragments the game into small pieces, learning how those individual parts work is a good method to not be completely overwhelmed. In a way, not really being able to know everything is the reason why it’s still fun to play the game, even if you know a lot about it.

Putnam says that it’s common for open-source projects to opt for using a standardized code format. Even if that’s not the case for Dwarf Fortress, she still finds it easy enough. “It’s just one guy’s code. It’s very consistent. People ask me how bad the code is, and I don’t know what they mean by this,” she laughs. Algorithmically, the game is “pretty well optimized” and she doesn’t seem to think there are big changes that could be done. “Dwarf Fortress just does more calculations than the vast majority of games. It’s a miracle that it runs better than The Sims 3.” 

If anything, having access to the source code has allowed the new programmer to update the game’s extensive wiki with more accurate information about some of the clues from the community, one of which is a list of methods to maximize frame rate and improve performance. While the wiki entry is pretty damning against pathfinding as the main factor, Putnam says that there are other elements involved, such as dwarves looking at each other and doing the calculation to figure out if they’re friends or foes.

“Pathfinding is slow,” she explains. “And if it’s happening a lot, your game will slow down into a crawl. But it doesn’t happen a lot. That’s the thing. Pathfinding isn’t even a third as important as just everyone looking around and seeing if there’s anyone nearby for them to beat up or hug.” The community figured out that building star-shaped staircases improved performance, but as Putnam says, it’s because the walls break the line of sight, so characters can’t see dwarves that are 20 steps down and aren’t forced to run the calculation to figure out whether they’re their mom or a rival.

A recent optimization update attempted to make it so that dwarves who are dead, caged, offside, or a ghost aren’t involved in any of these checks. But the checks were still happening, as the game had to figure out whether the dwarves fit into any of those four categories either way. “That’s the kind of thing you want to minimize, it turns out, and the trick to minimize that is completely alien stuff that the community never picked up on,” she says.

A screenshot from the video game Dwarf Fortress.
Dwarf Fortress.
Image: Kitfox Games

Tarn says that he’s always been afraid of somebody looking at the game’s code and finding something horrifying in there. Even though he’s not so worried about it now, he thinks he was more touchy about the idea some time ago — not just because of the prospect of dealing with different programming styles, an aspect in which, fortunately, he and Putnam have a lot in common, but also because of how argumentative people can be online.

“People can be nasty generally about those things, and I just didn’t want to deal with that,” he says. “But that’s not the vibe here, so it’s fine. It’s just going to be funny when we find stuff that Putnam doesn’t want to deal with ... We already hit something like that — there was this gnarly line, and I was just like, ‘Yeah, I must have been tired.’ I mean, you can’t be programming for a long time and expect everything to be nice-looking. It’s just not how it works. That’s why we have so many bugs in so many games, right? We’re all human.”

Even before the addition of Putnam, Bay 12 Games had stopped being the duo’s exclusive project years ago thanks to the involvement of artists, music composers, Kitfox Games as a publisher, and most recently, the content creator SalfordSal.

Future steps involve adding Arena mode soon as well as continuing to tackle bugs and finishing the Linux and Mac ports. From there, Adventure mode is the big focus, for which the team is bringing on more people for graphics, audio, and so on. Tarn is hoping to have the mode up and running this year but remains unsure for the time being. He also mentions that hiring a QA tester wouldn’t exactly work due to the nature of the game, as one small change would require them to test everything related to it, and there wouldn’t be enough time. However, the team is envisioning options that other games have done, such as setting up a public experimental branch for people to provide feedback before the update officially rolls in. “I think Dwarf Fortress is still going to go forward at about the same rate and have the same kind of features added,” Tarn says. “Every step just involves more people.”

“Getting to work happened faster than I could have expected”

He explains that while the Steam and Itch version was a big launch, and there is a sense that the team could continue to grow, the release was a one-time event. There won’t be sequels or DLC. The momentum that took place in December is the foundation to support plans that span across years in the future, which include features such as villains, armies, and magic. “We just have to be careful about shedding off the launch lump because that’s all we get. We don’t want to be one of these tech companies this month [saying] we’re now laying off 8, 10, 12 percent of our workforce because we couldn’t manage our numbers correctly or some shareholder said some nonsense or whatever. So we’re just being careful.”

Putnam is clear about everything she brings to the table, from her focus on optimization with modern CPUs in mind to ways in which she can increase productivity for the team in general. Yet, at least at the moment, she tries not to step on anyone’s toes.

“If I had to go through the interview question ‘why do you think you’re the best fit for this role?’ I would have said it’s because I already know how to do all this stuff,” she says. “My main concern here is to see how painless I can make including another programmer in the development process while increasing productivity in terms of bug fixes and optimization. That has been, and still is, my priority. Getting to work happened faster than I could have expected, which is good, and there has been productive work on all sides now, and I haven’t gotten in the way. I hope I haven’t gotten in the way that much,” Putnam laughs.

“I think having someone who understands and is very protective of the nature of the game, that’s just going to be as good as it can be, right?” Tarn adds. “And I don’t know if there’s ever going to be trouble with the tone of the game. We’ll get to that as we go through it, but I think we’re in the best hands we could be.”