CFP: Porting Dwarf Fortress to OS X

I’m continuing to play Dwarf Fortress on a fairly regular basis, at least when I have time.

I’ve reached the underground lava river, set up a magma forge, and my latest wave of immigrants included a number of nobles – a broker, a manager, a sheriff, and a representative of the farming guild. They showed up and immediately began demanding luxuries (for starters, each wants their own personal dining room, sheesh). But they clearly make a difference: when the human caravan showed up to trade, having the broker really made things much easier. It’s not all wine and roses, though. There have been a few tragedies. The most recent was when my legendary miner was attacked by a lone fire imp. He burned to death, and died weeping.

The big problem with playing Dwarf Fortress, though, is that I have to reboot into Windows to do it.

So I am putting out a call for participation, on behalf of the developer: help port Dwarf Fortress to Mac OS X and Linux. This has to be done in a fairly indirect way, since the source code isn’t open source. But it can be done. Tarn Adams, the developer, has released the source code to an earlier game, Kobold Quest, under the BSD license. Click here to download the source code. Kobold Quest is a much simpler game, but uses basically the same display engine as Dwarf Fortress. His basic idea is that if someone gives him a rewritten Kobold Quest, he could use that to get Dwarf Fortress SDLified.

So the challenge here is to grab Kobold Quest and rewrite it to use SDL instead of native Windows calls. I’ve taken a look at the source code, and I believe this could be done in two or three days, at least for a basic command- line port.

I’m not doing it myself because, frankly, I don’t have those two or three days to spare right now.

If you’re up to the challenge, there are many Dwarf Fortress addicts who would be in your debt. And if you’re in the Pittsburgh area, I’ll buy you a six-pack at Dee’s.

As for why I care about having this game on Mac OS, the best I can do is quote from [this post on the forums](http://www.bay12games.com/cgi- local/ultimatebb.cgi?ubb=get_topic&f=2&t=000083&p=4) (in response to someone asking why dwarves who want to build an artifact, but can’t, go insane):

You have to look at it from their perspective, though. It’s easy to say that they’re snapping easily when you’re just looking at things from outside the monitor and reading events in lines on the screen.

When a dwarf gets a serious wound, though, they are likely to be maimed for life. It’s not so strange for extremely tough, previously self-relient types of people to completely flip out when faced with that sort of thing.

And we’re not talking about ‘seeing a rat’. We’re talking about having the fortress that you slaved to create crawling with rats. We’re talking rats and vermin crawling over you while you sleep and eating the food out of your hands.

And don’t forget the other things. Portions of the fortress are covered in noxious, wretched miasmas of decay so thick that they actually obscure your view. Friends and relatives die regularly and are sometimes just left to rot on the ground. Wild raccoons and other horrible monsters are just waiting for the chance to rip out your throat. If you make a mistake or fail to meet a production order, the sheriff cuts you to pieces with an axe. Horrible creatures regularly crawl out of your drinking water and try to murder you in your beds. Filthy new immigrants are constantly being shoved into your fortress' cramped quarters, forcing you to work yourself down to the bone to get new quarters ready and leaving you with barely enough food to get through the winter. And when food runs out, you’re reduced to grubbing for rats, beetles, and worms in order to survive.

And then, when inspiration finally strikes–when you finally a chance to do what you’ve been dreaming to do for your entire life, the one reason you really went through the hell of this horrible fortress, the one true Dwarven dream–when you finally feel inspiration strike you and can see the form of your artifact in your head, you end up wasting three months doing nothing as your incompetent leaders fail to provide you with the necessary materials. Eventually, the vision begins to fade and you realize you can no longer remember what the artifact you’d waited your entire life for even looks like. Wouldn’t you go mad, too?

Don’t ask why your dwarves go insane or throw tantrums. Ask how they manage to stay sane the rest of the time.

Yeah, move over, Bill Harris. I’m around the bend about it too.