Live data from Hacker News

How Dwarf Fortress is built

stackoverflow.blog

71–80 of 407 posts

Re: How Dwarf Fortress is built

#71

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.

I started doing game dev in DOS after reading Tricks of the Game Programming Gurus by Andre LaMothe in the 90s, so keep that in mind for the following advice.

Depends on what you want to do. If you want to code games because you find the programming aspect interesting, start small by writing your own versions of some simple games. I personally wouldn't recommend any frameworks or libraries other than (maybe) SDL. Implement everything in the simplest way you can think of that will actually work and only go back and refactor if you need to, that's the time to look up how other people have solved that problem [0]. Resist the urge to over engineer. I might be biased but I say target PC first. Windows specifically, but Linux isn't much worse as long as you never plan to deploy the thing. This is because these platforms are incredibly open and there is a lot of information and tooling available. After you get a feel for it, and have a good idea of what you want to make next, start incrementally branching out in directions that interest you.

If you have a good idea of the kind of game you want to make and want to start making it with as little friction as possible, then your best bet is to find an engine that is already well suited to that kind of game and learn just the things you need to in order to make it happen. Again, you'll want to start small regardless of what it is you actually want to make, just ensure that you're always moving toward that goal. That is very much not my path, so I have little other advice.

[0] If you look it up first without trying it yourself, you won't have a good understanding of the problem space. You'll end up believing in the commonly accepted answer as dogma and severely limit yourself.

Re: How Dwarf Fortress is built

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

I agree these types of features really embiggen the game

Re: How Dwarf Fortress is built

#74
post #62

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

No it isn't! It's so easy and effective for keeping track of your work and backups. If you want the absolute simplest way to use git, just setup an alias to do: alias gcmp="git add -A && git commit && git push" Now all you need to do is run gcmp every time you're ready to log the new state of your codebase. How could it be simpler? git only becomes more complex as your needs become more complex. At which point I'd re…

git commit to which branch? git push to which branch?

Re: How Dwarf Fortress is built

#75

Earlier quoted context omitted.

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

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

Personally, I started using git for my projects after I accidentally deleted a good chunk of source code and my closest backup was several weeks old.

Re: How Dwarf Fortress is built

#76

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 a scale that will 99.8% never happen or to account for some wild potential esoteric function in the ether that'll never happen as well. There's some weird dick measuring contest out there on the internet that I wasn't invited to where everyone is trying to out over complicate each other. They never stopped to properly learn any real design patterns, so their classes end up all over the place. "Its OOP's fault!" And hell, sometimes you used a hammer when a screwdriver was more appropriate. No big deal, we all make mistakes in lines of design logic. It ain't OOP's fault you made an oops.

Re: How Dwarf Fortress is built

#77

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.

SCM was commonplace by the mid 1980s at the latest. My CS program used CVS to submit code in the mid 1990s and as a network engineer we used RCS in 1990.

Re: How Dwarf Fortress is built

#78

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.

I'd go with Unity, targeting desktop for simplicity. There's an abundance of high quality tutorials (a respectable amount made by Unity) and the learning curve is gentle, imho.

Re: How Dwarf Fortress is built

#79

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…

That's why programming is king. Software engineering on the other hand...

Re: How Dwarf Fortress is built

#80

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’d love a reference to this talk.
Post reply on HN