Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would love to be able to read the Dwarf Fortress source someday. I know Tarn considers Dwarf Fortress to be his life's work, so it would be amazing if he decided to release the source someday -- even if that's 10, 20, 30 years from now.


He has said multiple times that he will release the source if he dies, so long as foul play is not suspected in his death.

I think for him it's more about being able to "own" dwarf fortress. If he open sourced it, large teams of people might be able to develop it much faster than he could, and if he doesn't really want to manage an open source project, that might end up in him losing control/maintaining a less popular game than whatever gets forked out. It's also widely suspected that the codebase is really bad, and he might not want to manage a clean up of it that makes it 'better' but which results in him not understanding it as well.


Why not manage the project like Cataclysm DDA? Let people write mods. If they are good enough just merge them into the main code base.


He wrote Liberal Crime Squad [0] which is GPL.

If LCS is any indication, the code in DF will be a horrible mess.

[0] https://sourceforge.net/projects/lcsgame/


The fact that the game has been seeing continuous development of relatively complex new features for this long means the code can't be too horrible. Perhaps very idiosyncratic and particular to Tarns personal preferences, but certainly not unmaintainable (this is just an assumption though).


I have maintained a fork of LCS. The code is unspeakably horrible. It's like its been run through an obfuscator. It requires a hardened, dedicated developer who has developed life-long immunity to code cooties to hack it.


He did start out as an academic/scientific programmer, so yeah.


Thanks, just spent some time browsing through that source. At first I was going to say it didn't look too bad, but then saw some comments from someone named Chris Johnson that everything used to be contained in a single game.cpp file. The current state of the source honestly doesn't look too bad. Some large and scary case statements and functions, but that's not always a terrible idea in game dev, and it looks to be well commented. But I'm not sure how much of that is thanks to Tarn or other people that have cleaned up the source.

That being said, LCS came out in 2004, so presumably Tarn has improved over the years.


From my understanding, Tarn first and foremost focuses on making the game fun (and Fun) rather than making the code well-organized and clean; I seem to recall some interview or maybe forum post where he made that clear.

In practice that likely means that the code is not all that well organized and planned out. Doubly so if he and his brother have been the only ones who have touched it -- there's a lack of outside influence that would drive one to clean up their code. I of course have not seen any of the source code for DF, so I this is purely my own hypothesis.


And yet I have seen other code bases become true unmaintainable messes after so long a time, even by their creators. DF works remarkably well. I know he has gone through a few large refactorings in the past out of necessity. I doubt the code is pretty or easy to follow, but I also doubt it’s bad in many ways that code can be so.


Yeah, agreed. The Dwarf Fortress code might look like a mess to an outsider, but the only thing that really matters is that it works for Tarn. A codebase that will likely only have one contributor ever doesn't need to be written to the same standard as codebases with many contributors. (I believe Tarn does all the programming and Zach does creative work / writing -- somebody correct me if I'm wrong.)


A dwarf can only dig deeper.


That style seems similar to a number of other terminal games. I think it's just the natural pattern to grow more and more switch statements and arrays if you expand your game without major refactoring.

At one point I tried to edit Nethack to make it impossible to die. It was kind of shocked by all the random checks strewn throughout the code.


For the time being you can enjoy the lisp/perl/ruby reverse-engineering/c++ decompiler tool used in df-structures[1] that was made to make dfhack[2] and Dwarf Therapist possible that were made to make managing a 100+ dwarves fortress possible.

[1] https://github.com/DFHack/df-structures [2] https://github.com/DFHack/dfhack


He's hinted that he could release the sources if the Steam/Itch sales make enough money that he could stop worrying about the stability of his income in the long term. The worry was that if DF got open-sourced and forked, people would give more money to the forked, polished version as opposed to the one version Toady is working on, but he wouldn't mind if he had enough money in the long term.


> He's hinted that he could release the sources if the Steam/Itch sales make enough money that he could stop worrying about the stability of his income in the long term.

The saddest part of Tarn's decision to put the game on Steam is to make enough money to pay off medical bills for his brother.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: