Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

331–340 of 407 posts

Re: How Dwarf Fortress is built

#331

Earlier quoted context omitted.

Totally agree on reading about EVE Online. This is a real classic if you haven’t seen it before, and actually contains a lot of very important notions for identifying Ponzi schemes: http://web.archive.org/web/20091026234156/http://geocities.c...

"I put the isk in risk!"

The ultimate "Safety off" button is Undock.

Re: How Dwarf Fortress is built

#332
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…

>Enough alcohol will kill a cat That's what intrigues me, Not played the game but this must because there were a list of things which could get the cat killed right? Then how come this is an unexpected bug?

The bug was the volume ingested when the cat cleaned it's self, was incorrectly calculated to be a whole standard drink.

Re: How Dwarf Fortress is built

#333

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…

The Baader-Meinhof phenomenon has hit me hard. I read an excellent blog post yesterday on this exact subject. Well worth a read, even if Rust isn't your thing:

https://kyren.github.io/2018/09/14/rustconf-talk.html

Re: How Dwarf Fortress is built

#334
post #316

Earlier quoted context omitted.

Last time I checked React happens to use OOP concepts from JavaScript, do you want a lesson on which ones?

Check React again and check more often otherwise you look like you don't know what you're talking about. Seriously. Functional components with hooks are the proper and modern way to do React: https://www.robinwieruch.de/react-class-component-deprecated The most popular widely used GUI framework in the world is eschewing OOP. Ever wonder why? I responded to another person here with a wall of text that should correct h…

Please enlighthem us how React is even able to work when we take away DOM and JavaScript OOP capabilities out of it.

I am quite curious how the browser is going to display anything.

You think that you know much more than me, enjoy a peaceful life thinking that way, if it makes you happy.

Re: How Dwarf Fortress is built

#335

Earlier quoted context omitted.

I am unaware of a single functional reactive UI library or framework that does not rely on other people's, most often object-oriented (or even *gasp* procedural) libraries to actually put anything on the screen. Of course it's relatively easy to build shiny clean wrappers around the dirty work that others have had to do on your behalf.

You're right you are unaware. This is not an insult and I'm not trying to offend you. This is a factual statement. You truly are unaware as you stated yourself, and I can prove it to you. First off FRP is actually a term. Functional Reactive Programming. It is 100% a functional paradigm that gasp by DEFINITION cannot be procedural. So you truly didn't know what you were talking about here: https://en.wikipedia.org/wi…

Ah so ReasonML doesn't transpile to JavaScript, an OOP language?

How does it run on the browser?

Re: How Dwarf Fortress is built

#336
post #142

I tried to play DF. I even got over the ASCII interface. But honestly Rimworld is better and a bit deeper.

I really can't agree. Rimworld might be more accessible, but it lacks DF's depth of simulation. Even if you ignore details in DF that are generally unimportant (e.g. all the intricate details of a dwarf's personality and the precise genetics of their facial hair), Rimworld's lack of 3D and fluid simulation alone make it vastly simpler.

But what really annoyed me about Rimworld, and why I never really got into it, was how "gamey" it feels.

One element is, the mechanics of random events, which feel extremely arbitrary. I'm not talking about random animals coming onto the map, that's little different from a legendary beast turning up in DF, but things like a solar event causing all your batteries to blow up for no reason. And random events seem to happen every few minutes. Whereas in DF, pretty much everything that happens, happens for a reason. There's randomness, but it's not completely random. If your fortress is wealthy, it will attract invasions. Forgotten beasts actually exist on the world map and have a history. That sort of thing.

In addition to that, crafting and combat are extremely simplistic compared to DF. In DF, bootstrapping an economy which can actually craft everything you need from scratch is actually fairly difficult and requires significant planning and investment. Many things require multiple stages of processing, and it can be very hard to find the particular raw material you need. In Rimworld, you pick up a few raw materials and can manufacture an assault rifle in a couple of minutes. And that assault rifle doesn't need ammunition, and is hopelessly inaccurate beyond 10m or so, for some reason. Compare that to DF where when a dwarf shoots a crossbow it actually does a 3D simulation of the bolt's trajectory. And in the background it's also simulating things like the bolt's temperature, and when it hits the target, it determines what happens based on the density and strength of the bolt's material and the material of whatever it hit.

Re: How Dwarf Fortress is built

#337
post #40
post #28

Earlier quoted context omitted.

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

Well, YAGNI does have both yin and yang in it...

Re: How Dwarf Fortress is built

#339

Earlier quoted context omitted.

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.

Exactly ! Apart from the "Mental model" and "superior ?" organisation of your "objects erm entities", there is a definite "cpu execution" advantage as well. Having the different system "execute" over items which is basically just data, helps keeping the data local and in the cache.
Post reply on HN