Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

121–130 of 407 posts

Re: How Dwarf Fortress is built

#121

To me what was most surprising about Dwarf Fortress, given the complexity, is that Tad didn’t use git or any other code repository until more recently.

Why would that be surprising? For a single programmer working alone Git is an incredibly complicated tool. P.S.: A lot of you are confusing "complicated" with "difficult".

I agree with this. I've been using cvs as my source control system of choice as a solo developer on my own projects for years and haven't switched to anything newer. I use git at work, but it's not worth the hassle for me at home. The workflow with cvs for me is basically "cvs update" (in case I need to know what changed) and "cvs commit". I rarely use branches. I religiously make one small-ish fix per commit and at least compile it, though I always run smaller things.

If I switched to working with a team I'd definitely use git. But for just me, cvs is all I really need. The most complicated thing I do is probably tag a release or revert to a previous revision of something, which is pretty rare.

Re: How Dwarf Fortress is built

#122

IMO that's one of the best ways a single programmer can spend his career. No weird requirements, no deadlines, no nothing, nada. Just one's passion and a product. Whether it is successful is irrelevant. Kudos Mr. Adams for making the achievement and moves gaming history. Going back to the interview, I found this line (and the logic attached) interesting: >Making the item system polymorphic was ultimately a mistake, b…

Everything about it is wonderful (I really mean that) except the fact that he's sponging off his mother to do it. I can't help but feel that it's a drop of vinegar that spoils the whole cup of milk

Why would this spoil the milk? Why is it called "sponging"? The middle class safety net (something I grew up without) is one of the greatest sources of freedom and investment generally available. Multi generational homes and properties are historically pretty normal and a net family positive for holding onto wealth.

For example: https://www.middleclasspaas.com/

Re: How Dwarf Fortress is built

#123

Earlier quoted context omitted.

I have a passion for programming but I need something to drive me. I'm useless when I try and make stuff on my own. But if I've got someone telling me "I need a system that does X", I just get highly motivated in delivering it. Like I need requirements.

Damn you sound exactly like me...when I work for my own projects they usually die off quickly once I figure out how to do it (without actually implementing it but I'm pretty sure it can be implemented in this or that way). But if it comes from a friend, or a colleague then I'm super focused on it until it's done. It's almost as if I do projects to show off to other people or I like to serve other people.

Part of the issue is that it is difficult to come up with problems worth solving.

I think Joel and Fogcreek is a great example. He started out with the premis that you don't need an idea for a successful software company, you just need to find great devs and create the best working conditions and then success would come. This was a novel idea at the time since Apple was the only FAANG that even existed and this was their "beleaguered" period. As should come as no surprise to anybody, they ended up creating...bug tracking tools and a kanban board, albeit quite good ones.

Another thing that helps, since the problem is not your own but somebody elses, you don't get bogged down trying to figure out the best way to solve it for yourself, you just solve it for somebody else without all the emotional attachment to the problem. This lets you instead be emotionally attached to the process.

Point being, I think you're selling yourself short.

Re: How Dwarf Fortress is built

#124

Earlier quoted context omitted.

I mean using SCM became the norm in maybe last 10-15 years ? When this was started I don't think using SCM was as ubiquitous as it is today, not to mention on a solo project. If you've been hammering away since then I can see how you might have missed it.

SCM was commonplace by the mid 1980s at the latest. My CS program used CVS to submit code in the mid 1990s and as a network engineer we used RCS in 1990.

I remember using sccs in the '80s.

Re: How Dwarf Fortress is built

#125
post #33

> What’s your favorite bug and what caused it? > A: It’s probably boring for me to say, but I just can’t beat the drunken cat bug... That was the one where the cats were showing up dead all over the tavern floor, and it turned out they were ingesting spilled alcohol when they cleaned their paws. I think that bug explains very well just how deeply complex Dwarf Fortress really is. Drinks can be spilled. Some drinks ha…

Reminds me a little bit of something strange I saw in Rimworld - all of my dogs were developing liver cirrhosis!

It turns out that my dogs weren't alcoholics - it just happened to be that beer was the only food source they had zoned access to, so they were drinking it out of hungry desperation, and while it gave them enough calories to live on, it also gave them cirrhosis.

Re: How Dwarf Fortress is built

#126

This is a little bit of a hijack but if I wanted to start coding games as a side project, where would I start? Which platform? Mobile, PC, console? Any good introductions on the subject of solo game development? I know I can google this, but I trust HN users more than the Google algo.

I started contributing to an old open source strategy game, I played as kid, couple of months ago

It was extremely pleasant to fix some old bugs that kept annoying people (and me!)

I spend more time in the game guts, than playing though

I believe it's easier to start with existing game, than creating new one from scratch

Re: How Dwarf Fortress is built

#127

IMO that's one of the best ways a single programmer can spend his career. No weird requirements, no deadlines, no nothing, nada. Just one's passion and a product. Whether it is successful is irrelevant. Kudos Mr. Adams for making the achievement and moves gaming history. Going back to the interview, I found this line (and the logic attached) interesting: >Making the item system polymorphic was ultimately a mistake, b…

I was with you until:

> Whether it is successful is irrelevant.

At some point something needs to be successful or you can't keep working on it, right?

Re: How Dwarf Fortress is built

#128
post #33

> What’s your favorite bug and what caused it? > A: It’s probably boring for me to say, but I just can’t beat the drunken cat bug... That was the one where the cats were showing up dead all over the tavern floor, and it turned out they were ingesting spilled alcohol when they cleaned their paws. I think that bug explains very well just how deeply complex Dwarf Fortress really is. Drinks can be spilled. Some drinks ha…

Unfortunately it remains unexplained (by the article) why this is considered a bug. It would be unethical to test, but this seems like perfectly cromulent behavior one might actually see in real life.

My experiences with cats (at least in my own life) is that cats prefer not walk into an area with a sticky floor if they can avoid it.

Clearly there's a bug here where the cat will keep wandering around on the sticky floor, and then keep consuming the alcohol off it's paws.

The obvious fix is to add a feature wherein different creatures have preferences about where they go next, and then use that to have the cats avoid the bar floor if they can.

As a bonus you can include stuff like "Cats don't like hanging out in crowded areas" so that they'll also stay out of the main hall when the army is gathering to muster forth, etc.

(/s, but only slightly :) )

Re: How Dwarf Fortress is built

#129
post #34
post #23

Dwarf Fortress consumed hundreds of hours of my life in high school, I have so many fond memories of it. Every year or so I come back to it and I'm always surprised that they've managed to add another mechanic or feature that just makes the game feel even more like its own little universe. After enough time in the game there really is a moment like that scene in the Matrix - "I don't even see the ASCII anymore. All I…

Passion project? It is the sole source of his income.

I've been working on a project for a long time. It's not even yielding income, though I hope it will. A friend referred to it as a passion project. That hurt for some reason. I can't explain why.

Re: How Dwarf Fortress is built

#130

Making the item system polymorphic was ultimately a mistake, but that was a big one. Q: Why was this was a mistake? A: When you declare a class that’s a kind of item, it locks you into that structure much more tightly than if you just have member elements. It’s nice to be able to use virtual functions and that kind of thing, but the tradeoffs are just too much. I started using a “tool” item in the hierarchy, which st…

That's very interesting, because I had observed exactly the same when I tried to implement a rogue-like in Java some years ago. For example, I had to decide whether there should be different subclasses for spell books, the different weapon types (e.g bows vs swords), drinks, etc. or just one big Item class. Closely related to that, another decision I had to make was whether object or character properties should be implemented as class members or as entries in a hashmap (where the latter is a class member). At the end, I had the feeling that I was implementing my own class/object system on top of Java's one. I guess in other languages, like lisp, this is not really an issue.

IIRC I already wrote that here on HN, but I think implementing a simple rogue-like is an excellent exercise to get familiar with any programming language.

Post reply on HN