700,000 lines of code, 20 years, and one developer: How Dwarf Fortress is built
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 with histories, mythologies, and artifacts. I reached out to him to see how he’s managed a single, growing codebase over 15+ years, the perils of pathing, and debugging dead cats. Our conversation below has been edited for clarity.
![](https://cdn.stackoverflow.co/images/jo7n4k8s/production/85605f786761be4220ebb2ffcc7375a10145ef20-1600x1200.png?rect=0,180,1600,840&w=415&h=218&auto=format&dpr=2)