Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

31–40 of 407 posts

Re: How Dwarf Fortress is built

#31
post #2

I read everything about this game I can get my hands on. I don’t fully understand why I find dwarf fortress so intriguing. It’s such a pure passion project… that actually made it.

Do you actually play it? I'm a bit the same about reading about it, yet I have never once played it for myself!

I tried playing it like a decade or two ago. Couldn’t get past the ridiculous learning curve.

Re: How Dwarf Fortress is built

#32
post #26

Earlier quoted context omitted.

Sure, but it also removes most of the reason to use Git.

I invite you to try using Git as much as possible for two weeks. After a week I started using Git for branching out of my main branch to test several different ideas and then compare them at once with other developers - colleagues or friends. I think that moved the meetings and discussions with my teammates up a level.

I have used Git when working with FOSS projects, and I tried using it for my own but it never took. The sort of workflow it is built for just isn't how I like to do things when I work on my own.

Re: How Dwarf Fortress is built

#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 have alcohol. If cats step in something it sticks to their paws. Cats clean their paws, causing them to ingest what's on them. Enough alcohol will kill a cat. Put together: dead drunken cats.

Re: How Dwarf Fortress is built

#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.

Re: How Dwarf Fortress is built

#35
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.

Re: How Dwarf Fortress is built

#36
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, but that was a big one.

>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.

I guess when the game becomes moderately complex then ECS or something similar suddenly makes a lot sense.

Re: How Dwarf Fortress is built

#37
post #31

Earlier quoted context omitted.

Do you actually play it? I'm a bit the same about reading about it, yet I have never once played it for myself!

I tried playing it like a decade or two ago. Couldn’t get past the ridiculous learning curve.

Its worth the effort and likely easier now than before. The myriad ways that a fortress can die amazes me. Its easy to get a fort that can survive invaders but ultimately your fortress will die. The number of times I have been nonplused by a new fortress failure is amazing. Those crazy dwarves keep finding new ways to destroy themselves.

Re: How Dwarf Fortress is built

#38

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".

While Git is not without it's complexities, but as a developer who must use it with teams anyways, I find there are very simple workflows with almost no cognitive load that I'm able to use for my personal projects. Not only does this give me snapshots of my projects from any point in time, but backups as well since I use a free GitLab account as well.

Re: How Dwarf Fortress is built

#39

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…

"Tool" is still a class, with perhaps very generic polymorphic methods (e.g. do_default_action() ). The problem is not polymorphism per se, but rather about having a deep class hierarchy aka lasagna code. My policy: OOP is like salt. Use little and that's great. I only allow a single inheritance layer, and ideally no inheritance at all.

"I only allow a single inheritance layer"

I would agree to that as a goal, but not as a dogma. It depends what you build, I guess.

Re: How Dwarf Fortress is built

#40
post #28

Earlier quoted context omitted.

"Tool" is still a class, with perhaps very generic polymorphic methods (e.g. do_default_action() ). The problem is not polymorphism per se, but rather about having a deep class hierarchy aka lasagna code. My policy: OOP is like salt. Use little and that's great. I only allow a single inheritance layer, and ideally no inheritance at all.

> My policy: OOP is like salt. Use little and that's great. I only allow a single inheritance layer, and ideally no inheritance at all. That's been my observation as well - there's no free lunch and DRY isn't free either, certainly not if you use inheritance chains to achieve it. I'm starting to think that the only programming axiom that will survive in the end is KISS.

KISS and YAGNI are like yin and yang for me.
Post reply on HN