Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

231–240 of 407 posts

Re: How Dwarf Fortress is built

#231

Earlier quoted context omitted.

https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-s... I've seen this post brought up as relevant regularly up till 2010. You may have been lucky to avoid the dredges but SW industry in the 2000s was a copy-paste fest (not in the "copy from stack overflow" sense but as in "copy paste instead of creating a function"), PHP with SQL in templates and string concat queries all over the place, MVC was a revolution…

In the Windows world SCM was not generally available until SVN was released as a File Explorer extension. This was sometime in the 2000s. Git took several years to become viable on Windows.

There were plenty of proprietary source control systems around. At my first job in 1998, we used Visual Sourcesafe, later switching to Perforce.

At another job I had the misfortune to get to know Rational ClearCase.

Re: How Dwarf Fortress is built

#232

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

Is it? That's when git is simplest, having a single branch and never merging removes most of the complexities of git.

Why tho?

You can create as many branches as you want and do all the experimentation you want.

When I stopped caring about committing and branching (something I’ve too long associated with pushing code, like reaching milestones) and started doing both as much as possible I really felt lots of freedom.

Instead of overthinking I can create parallel different approaches and see where they lead to. It’s amazing.

Re: How Dwarf Fortress is built

#233

Earlier quoted context omitted.

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.

Solo workflow is as simple as write code, git commit, repeat. Throw in a git push every once in a while. All on master, no branching or forking.

I do a lot of that in my solo project. I would add to your list "write a commit comment". It's like keeping a journal you can go back to. It gives me time to stop and think what have I done, what needs to be done next.

I don't much read my git-commit-comments but I think it is useful to write them.

I don't usually branch, at least at this stage of the project. Probably yes when I go to production when there is a need to fix bugs in the released version(s) without having to put all the latest code into it.

Even without branching commits are a good way to save the latest known good state I can easily go back to if things didn't work out.

Re: How Dwarf Fortress is built

#234
post #142

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

Rimworld is phenomenal… I absolutely love it, but I wish it had z-levels and the fluid sim of DF. Nothing is more fun than accidentally flooding your fortress with magma!

Re: How Dwarf Fortress is built

#235

Earlier quoted context omitted.

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.

Do you have a source for this?

Re: How Dwarf Fortress is built

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

I don't know much about Dwarf Fortress, but why is that a bug? It sounds like it follows reasonably well from the behavior in the game.

Re: How Dwarf Fortress is built

#237
post #42

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.

Pretty sure all of my professional work used SCM starting in the mid-90s (CVS). May not have been the norm for solo devs at that point, though.

The first large project I contributed to was GIMP in the mid-1990s and that was under CVS. I think the oldest personal repositories I have are a little later under Subversion, so yeah, certainly my personal projects in the era where I first used CVS to work on GIMP did not have version control.

Re: How Dwarf Fortress is built

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

One time a raider broke into my animal pen and started attacking my animals, but got shot down by a turret before they could cause any lasting damage. I didn't pay it any mind, but that raider had brought in a good chunk of Yayo (the game's cocaine analogue) that had scattered around in the pen when he died. By morning I had a herd of inebriated megasloths hunting down my colonists en-masse.

Re: How Dwarf Fortress is built

#239
post #142

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

Rimworld is a better game but not really the deeper sim (I feel like it worked on distilling a lot of what made dwarf fortress compelling while making it much more accessible, and part of that is simplifying).

Re: How Dwarf Fortress is built

#240

Earlier quoted context omitted.

This is one of the things I like about Go. Just structs with methods. You can embed them but it seems to hedge against deep nesting and creates simple code

Then how would you model composing behaviors in Go. Say for example I have a representation of Food and a representation of Animal. I then want an ability that will "animate" things, so I can animate Food to give it the behaviors of Animal. I'm not being critical either, I'm seriously curious how somebody would implement this behavior in Go. Like you say, just struct with methods is a very appealing mental model sinc…

Go has interfaces, but not inheritence.

I'm slightly confused about what you're trying to describe, but maybe it's something like this?

https://play.golang.org/p/smPyWvBvWWp

We can make both Food and Animal statisfy the "Animateable" interface.

Go also has a syntactic shortcut which is similar to inheritence, but more explicit. If you include a field in a struct without any name, it is considered "embedded", and you can call methods on the field directly, without referencing its name, which ends up looking the same, at the call site, as inheritence.

https://play.golang.org/p/cIMqQqE0eVc

But everything is still explicitly laid out in the struct -- it's just a simple struct, no inheritence shenanigans.

I think interheritence is a mistake, but interfaces are the bees-knees. Even in C# (which is my main language these days, 'cuz that's what you use if you're making a game in unity), I just use interfaces, not implementation inheritence.

(And even interfaces I don't use much -- but when you need it, you need it!)

Post reply on HN