placeholder

700,000 lines of code, 20 years, and one developer: How Dwarf Fortress is built - Stack Overflow Blog

Dwarf Fortress is one of those oddball passion projects that’s broken into Internet consciousness. It’s a free game where you play either an adventurer or a fortress full of dwarves in a randomly generated fantasy world. The simulation runs deep, with new games creating multiple civilizations wi...

Click to view the original at stackoverflow.blog

Hasnain says:

Interesting and endearing read on dwarf fortress and the challenges of maintaining a long running software project.

“Q: What are the challenges in developing a single project for so long? Do you think this is easier to do by yourself? That is, because you wrote every line, is it easier to maintain and change?

A: It’s easy to forget stuff! Searching for ‘;’, which is a loose method but close enough, we’re up to 711,000 lines, so it’s just not possible to keep it all in my head now. I try to name my variables and objects consistently and memorably, and I leave enough comments around to remind myself of what’s going on when I arrive at a spot of code. Sometimes it takes several searches to find the exact thread I’m trying to tug on when I go and revisit some piece of the game I haven’t touched for a decade, which happens quite a bit. I’d say most changes are focused only on certain parts of the game, so there is kind of an active molten core that I have a much better working knowledge of. There are a few really crusty bits that I haven’t looked at since before the first release in 2006.”

Posted on 2021-07-30T03:03:13+0000