Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

161–170 of 407 posts

Re: How Dwarf Fortress is built

#161

Earlier quoted context omitted.

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 avo…

And this is how you get 700k lines of code.

Re: How Dwarf Fortress is built

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

A few weeks ago some commenter here said they ascribe to WET - Write Everything Twice. Basically worry about abstraction when you get to number three.

And what an acronym given the context!

Re: How Dwarf Fortress is built

#163

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?

As long as you feel good I think it's OK. Most passion projects don't really generate a lot of revenue.

Re: How Dwarf Fortress is built

#164
I always wanted to love DF but I could never get into it. Perhaps it was the ASCII.

I found Rimworld to scratch the same itch and have sunk many hours into it. I feel like it is spiritually very similar, even if the depth of simulation is not as deep as DF.

Re: How Dwarf Fortress is built

#165
post #30

Earlier quoted context omitted.

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

Change history, if nothing else. That alone brings a ton of benefit, from being able to view earlier versions, to recovering from mistakes or lost code. If you have a remote repo then, you can also have offsite backups. If you never branch, it's still massively worth it.

Does git have benefits, yes.

Are git commands obtuse and unfriendly, yes.

The problem is that git is not intuitive and isn't automatic. I've seen more people loose code to git than be saved by having their repo offsite.

Re: How Dwarf Fortress is built

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

The bug was a numerical error that would cause cats to drink something like the equivalent of a pint of beer for every lick, and therefore die prematurely. He talks about it in this video:

https://www.youtube.com/watch?v=VAhHkJQ3KgY

Re: How Dwarf Fortress is built

#167

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

Same here. I'm motivated by being on a team that I don't want to let down, and getting a pat on the back when I deliver something great.

I think it's because the early stages of a new project, where you're doing a ton of googling and head-scratching, are kind of painful for me. I need that team or client or business owner counting on me in order to push through that part.

Then I can roll on my own when I get to the fun stuff (for me) - creating features with well-understood tools, and refining and organizing code.

Re: How Dwarf Fortress is built

#168

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.

I feel this.

Re: How Dwarf Fortress is built

#169
I love the idea of Dwarf Fortress and I think the internet purest mission is to disseminate works of passion such as this, not to sell me ads instead. That said, I can't get past the ASCII interface -- I'm a huge fan of IF games (which used to be called "text adventures" in the olden days) and I can deal with spartan UIs, but for real-time strategy/sandbox games, I absolutely need some sort of graphics. Tiles, at least. The same happens to me with Nethack, which fortunately does have graphical tilesets. I'm glad to read Toady One is working on such a UI!

Something I found insightful about TFA was this:

> Q: With your ~90 side projects, have you explored any other programming languages? If so, any favorites?

> A: Ha ha, nope! I’m more of a noodler over on the design side, rather than with the tech. I’m sure some things would really speed up the realization of my designs though, so I should probably at least learn some scripting and play around with threading more. People have even been kind enough to supply some libraries and things to help out there, but it’s just difficult to block side project time out for tech learning when my side project time is for relaxing.

This is interesting. I constantly feel the temptation to learn new tools, new languages, new stuff. I get sidetracked by the tech. But the key to successful games seems to be designing them and sticking to the work of making them work no matter the tech or language. If Toady had kept playing with programming languages and frameworks instead of sticking to his actual project -- creating a game -- maybe Dwarf Fortress wouldn't exist, or it wouldn't be as featureful.

Re: How Dwarf Fortress is built

#170

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.

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.

> I mean using SCM became the norm in maybe last 10-15 years

more like 30, at least in a lot of the industry. Even just looking at open-ish systems, people were excited about SVN in what, 2000?, because they had been working with CVS for years, if not a decade or more, at that point.

Post reply on HN