Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

181–190 of 407 posts

Re: How Dwarf Fortress is built

#182
post #179

Earlier quoted context omitted.

My policy is OOP is like Heroin. Don't even start.

Never write GUI code then.

Yeah that's the one downside of not doing OOP. OOP is the only way to do GUI stuff.

Nobody on the face of the earth has ever used Functional Reactive Programming. It's a made up concept. In fact it's also definitely not one of the concepts that inspired the most popular pattern in React.

Re: How Dwarf Fortress is built

#183

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…

Sorry but a lot of the complaints from the article and what you linked are... well weird. Look, I'm no grand ninja guru wizard programmer, but after a decade of programming on and off as a job... wtf are you all smoking? Theres nothing to preach but to check your hubris. A majority of problems stem not from OOP or whatever language being used, it's from over abstracting. This is mostly due to trying to pre-build for…

Let's just say that there's a reason game dev has tended towards ECS/data-oriented design.

A program that puts a handful of form widgets, consumes a bunch of text or spends most of its time waiting for I/O is far from the same domain.

Re: How Dwarf Fortress is built

#184

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.

I agree these types of features really embiggen the game

They're perfectly cromulent features.

Re: How Dwarf Fortress is built

#185

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.

Cats in bars don’t die of alcohol poisoning regardless of the amount of beer spilled on the floor.

I read about a cat who used to visit a pub and learned to lick beer from under taps. The cat got banned from the pub for its own good but I don't believe it was anywhere close to poisoning.

Re: How Dwarf Fortress is built

#186

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…

Hickey nails this one in his talks. When you make something a class, that's NOT an abstraction, that's a concretion. You make a Tool class, you haven't abstracted what a tool is, you've made a fixed decision about what it is. For games that want this level of complex interaction between components, entity component systems are the way to go.

I would argue that if you have a "Item" class then it is the set of all concretions/specializations.

By creating a tool class you haven't extended the set, you've instantiated a subset of the set of items that contains the items that are tools but nothing else. It's obvious why it is so difficult to represent a tool that is also e.g. a consumable item. The set of items that are both tools and consumables is a superset of the set of tools and set of items. You can't represent it through a second layer of inheritance because it only lets you create a subset of the items that are tools. You obviously have to use multiple inheritance for something like this because it will let you form the set of items that are both tools and consumables. Of course, multiple inheritance is very messy so you should try to avoid it.

Re: How Dwarf Fortress is built

#187
post #137

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

Basic git-fu (init, add, clean, commit, pull, push, branch, merge, stash, log) goes a long way to make your life easier. You can leave the fancy stuff for later. There are even git repos of 99% done .gitignore files for most needs [1], which is most of the setup work for a solo project. [1]: https://www.toptal.com/developers/gitignore

The official github desktop app is really nice to use as well. At least on a Mac.

Re: How Dwarf Fortress is built

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

Yeah, I've definitely accidentally created packs of booze hounds that way. Definitely a head-scratcher before you get what's going on.

Re: How Dwarf Fortress is built

#189

Earlier quoted context omitted.

I've put in probably over a thousand hours on it, and have played it over the years as new releases come out. I've gotten to the point where I usually hit FPS death (too large a fortress that it overloads the CPU) even on the harder starts and with dfhack to help. The draw for me was the steep learning curve that rewards you with logical complexity when you finally understand it. The lore that your fortress generates…

For me, the reason I have stopped playing is that I have issues managing migrants. There are just too many dwarves to care for. Even DF Therapist doesn't (or didn't?) really help micromanaging jobs. It becomes tedious quickly. I remember seeing something about auto-allocating jobs, but it didn't work for me.

Most hardcore players set limits on the number of dwarves. This helps both with the micromanagement and with FPS.

Re: How Dwarf Fortress is built

#190

Earlier quoted context omitted.

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.

Oh Markus where were you like 5 years ago?!? :)
Post reply on HN