Wednesday, November 30, 2022

Dwarf Fortress and Interview with Tarn

The Steam version of Dwarf Fortress is releasing on December 6 (with graphics, a revised interface, and tutorials), so it seems like the right time to post a short Q &A I had with Tarn a few months back. 

For my money, Dwarf Fortress is the greatest sim and story generator ever created, so a new release making it more accessible to new players is a big moment.

Q: I've never heard anyone ask you about the process you use when adding things to the world. for instance, creatures. When you decide to add a creature, I assume the process is something like this:
--create creature (it must exist)
--add detection of its existence (the world and other characters must be aware)
--add behavior to the creature (it must have agency)
--its behavior must be observed
--its behavior must drive the reaction/behavior of other characters when appropriate.

Is that close to how you do it? I'm really curious about the process.

A: I'd say that for creatures, once the basic definition is up, the creature's central behavior comes first - it's a narrow line between reacting to a creature and reacting to its behavior, so you'd get the isolated bits out of the way first (the creature wanders around, nibbles grass, makes a burrow somewhere), then having that completed, you can handle everything else around it.  This lets you also sit a minimum number of times inside each frame of reference, so you have to keep less in your head at once and refamiliarize yourself with less code.  That's the ideal world though.  If the creature is antagonistic, you might have to do the behavior and reaction all at once, since it sort of amounts to the same thing anyway.  Even then, I'd try to handle the creature in isolation first.

There's also an added layer where you relate the object being added to the player - how do they observe it?  What can they do?

Take DF gremlins for example - they sneak into fortresses and pull levers, jump on pressure plates, and release monsters from cages.  When we added gremlins, we did all of that first.  Just make sure the basic behavior is working.  Then we worried about the dwarves' detection and response.

After that, we worried about the player - how frequently should gremlins come?  How do we get the mischief and the dwarves' reaction across to the player?  What meta-game might the player use to circumvent gremlins, and how can we dodge the first few layers of that without going overboard and making them too hard (assuming we can accomplish that)?  Players can place false levers for instance, closer to the caves, for gremlins to pull to give themselves away.  Now, if we made the gremlins only pull levers that had been pulled by the player to some effect and haven't been subsequently altered, this would make gremlins nastier without being too unfair.  Ultimately, we didn't do even that.  But when we add saboteurs with the villain stuff, that's a lot more fair since the saboteur should know the workings of the fortress.  An enterprising player could still make an intricate false lever that acts as a distraction, but it's more hassle and less of a sure thing, and they'd have to maintain the ruse by pulling it every so often, in which case maybe the saboteur has already won ha ha.

Q: Second example: a larger scaffolding, like a justice system. What steps do you use for something like that? Have you done major additions like this to the world so many times that it's a standard routine, or is there quite a bit of variance?

A: I have some standard practices for new additions I've done enough times, but they don't help with entire systems, except to build up individual moving parts.  You still have to think the whole system through and the implications are likely new.  Even then the basic shape of the process isn't too different from the gremlin example.  How does it work?  Can I implement that in isolation responsibly (speed/memory/etc.)?  What existing systems interact with it?  Which of those interactions are player-facing, especially in a way that generates story moments?  Can I amplify the story-generating elements of the system safely?  And, like, is it at all enjoyable?  Are there specific roadblocks there that I can remove or sidestep?

It's crucial as a designer to stay grounded in the user experience, and as a developer to keep things practical.  When I'm planning something, I find myself with a constant game instance in my head, adapting to possible changes from the player's perspective and from the simulation perspective, mechanically, as if I'm both playing it and running it.  This doesn't mean I do it accurately enough to catch all of the surprises, but like almost anything, you can get better and better at this.  If I'm talking to somebody else to help them out, or starting something new, I try to ask enough questions to get that engine running, or I'm just not going to be very useful.

Q. I remember reading several times that Zach does a large amount of historical research. As the world's own history has grown, has it become less important to research actual history, or is it still an important component? I was thinking that as the world became more complex, it's reliance on actual history would lessen.

If you are still doing quite a bit of historical research, has the focus shifted from individual elements (justice, for example) to a broader look at the rise and fall of civilizations?

A: It's true now that not just historical research but research and invention of all kinds have become sort of less urgent.  There's such a huge, huge backlog, so much stuff that we'd like to do that it's now impossible.  Still, when we begin a new phase, the specifics all become important again, and we'll find ourselves reading, or reading suggestions from people that have already compiled information or know more about a topic than we do.  I think the general vibe has been baked in for a while, and a good chunk of that came from Zach's history.  When we get to the myth generator, the vibe is going to take a turn, and there'll also be a lot of research underlying that, but in a different direction.  Then we'll be back to history, ha ha, since we're doing the civilization rewrite/expansion after that, and our ancient law books will finally have their day.

And yeah, before the civ rewrite even, a main theme for the myth/magic stuff is change.  Everything is so static now.  You really don't get a feeling of migration, or revolution, after the initial expansion.  I think there'll be some tension there to get some of that in earlier, but certainly during the civ rewrite we're going to have to think about larger forces and then try to avoid adding them directly.  It's always better when the many little bits do their part, ha ha.  I have no idea if we'll be able to pull it off though.  And one of the most important parts, the overall world economy, is still mostly missing.

Q: How do you handle days off? How often? I find that if I take a day off (or, god forbid, two), it takes me several days to feel totally comfortable writing again. I just don't feel sharp if I don't work every day. You've been doing this for so long and I'd be really interested in how easy it is to stop and start after time off.

A: Covid and the Steam work coming together has made this difficult to answer, since there hasn't been much time away.  I've taken a day off to play a game, say, or to do this or that, but I haven't taken a vacation or regular weekends in years.  Every time I try to do something like instituting weekends, I just get sucked back in.  It's mostly been this way my whole life I think, it just feels particularly acute now and I don't have any counterbalances.  But I don't feel much worse for wear, since I'm used to it.  Taking two days away from the game or things surrounding the game would feel like trying to plug up a dam right now.  I don't think it would be hard to get back into it (I don't know?) but it would be really uncomfortable.  There are things to do.

After the release, some time after the bugs have cooled perhaps, I feel like there may be an actual break.  Maybe because it feels like a thing to do, more or less, and all the people I work with will want to, and should, take the holidays.  Then I'll know what it's like I suppose.  In the past, when things like this happened, I just did a side project.  That feels weird now too though.  I haven't done actual code on a side project for some time, since the present release has felt urgent enough.

Many thanks to Tarn for taking the time to answer these questions. Here's the Steam page for the game (releasing next Tuesday): Dwarf Fortress.

Site Meter