Home | Giveaways | Rules and About
last modified: Friday 29 January 2016
author: Hales
markup: markdown

Dwarf Fortress on old hardware

The Game

Dwarf fortress is a dark game. In its main mode you can only indirectly control the dwarves and through your stupidity they will all die.

This game will bring your computer (and your work life, atleast temporarily) to its knees.

I was introduced to 'dwarfdom' (along with roguelikes such as nethack) by friends in highschool. Once upon a time my school library was a place where the commons would crowd at lunchtimes. In the depths of the share drives; games, emulators and roms lurked.

The librarians regularly patrolled the library in an attempt to stop the antics. Students trained hard in the arts of tab-fu. Nintendo 64 games became a staple.

The arms race ended when the network drives were cleaned up and re-arranged. The single drive shared between staff and students was split and students were left with their own seperate area. This dedicated region quickly descended into a chaos of malicious batch files and mass deletions.

The cleansing of the games did not stop the gamers. Through the flames a new generation appeared in the school, but no longer in the library. For these new laptop-bound gamers preferred the quiet corridors of old buildings and disused common rooms. True places of dwarfdom, where the light is thin, the plumbing drips and the fans hum.

The Test Subject

A year or so ago I threw this machine together. It's name is 'Tapemor':

From the outside it masquerades as a VHS machine. The play button is wired as the power switch, the play LED is the power light and the VHS hatch door has been modified to latch open and closed using magnets.

Most of the parts were scavenged from e-waste class electronics.

Specs:

I wanted to run Tapemor with as passive as possible cooling. I replaced the fan on the PSU with a quiet/slow model and retrofitted a much larger heatsink to the processor.

Unfortunately the processor is prone to overheating. Although this computer draws only a little power there is bareley any airflow in the case and the processor likes to shut down well shy of 80 degrees C. The fan on the power supply does not pull much air through the case because of some badly positioned vents. I'll rectify this another day.

For now a blue fan from my old graphics card gently stirs atop the processor. Its bearings had started failing and making lots of noise in their original home, however here the fan is mounted upside down and has no problems. I'm running it off 3.3V, staked into the crimps on the ATX connector:

In place of a HDD I'm using a 16 gig CF card in an adapter, both off ebay. CF controllers can run directly as IDE devices, provided you have a physical adapter for the different pin pitches and layout. It's a nifty feature for old comptuers.

I would have opted for cheaper SD card or USB flash drive storage, however this motherboard refuses to boot off anything that is not a floppy or a harddrive. The CF card pretends to be an ordinary IDE harddrive so the motherboard is happy to run with it. I'm sure IDE to SD options are another alternative these days.

Software

Tapemor is running wheezy, an old version of Debian that's still bareley supported. After wheezy they started using systemd (something I have had poor experiences with -- for another post another day) so I felt reluctant to update.

The intel i810 chipset's graphics are not supported by the kernel I have installed, so I'm limited to a simple text console. I believe support for i810 was dropped from the main Linux tree a long time ago.

Luckily Dwarf Fortress has a text-only (ncurses) mode that it can run in.

Running and Installing DF

I did not have a network switch handy, so I installed an ethernet PCI card in my main computer and bridged its connection with my router. This gave Tapemor internet access.

The Linux version of Dwarf Fortress comes compiled for x86 (32 bit) and luckily does not seem to need any modern x86 processor features or instruction sets. It does however require a whole slew of libraries, but I had no troubles installing them. If the game executable cannot find the library it's after then it will tell you what it's called.

Overall, installation was pretty painless. Running the game was more difficult.

I was initially able to generate a world, however I ran out of memory when I tried to play it and my kernel killed the game. It seems that 180 MiB is not enough these days :(

No worries! I have whole megabytes being wasted by all this background junk:

Bash itself takes a few MB, so I switched over to dash. More space!

You will notice that these pictures are taken with a camera, not screenshotted. Normally I would use a utility called fbgrab to take pictures of native linux consoles, however it failed to work in this situation. I believe the text console I'm using is run directly using BIOS calls rather than the kernel rendering into a framebuffer.

I could have ssh'd or telnetted in, but I was really squeezy on memory. Tolerate my photos!

I chose the simplest and smallest world generation possible:

The worldgen process revealed a problem: poor character support in my console.

Where are the mountains and the oceans? Hidden in the darkness of out-of-range characters. I was not able to fix this by changing console fonts.

I was ecstatic when I was able to get a 1x1 embark working:

The frame-rate hovered around 50FPS and everything seemed to be going well. I'm sure memory usage would expand over time until the game crashed, however I did not play for long. I had my reasons:

The shot above is realtime. The top of the chamber is actively being dug by a dwarf. What dwarf? Sssh. That's beyond my charset.

Switching to another console I had a peek at the memory usage:

16 megabytes free??? I have acres of room! Pah what was the kernel complaining about.

Final notes

Can you run Dwarf Fortress on something even older? What hardware do you have lying around? Give it a go.

(Try watching some videos using libcaca too!)


No one has commented on this page yet.

Add your own comment:

Name:
Email (optional):
URL (optional):
Enter the word 'irrlicht' (antispam):
Do not enter anything into this box (antispam)

Comment (plaintext only):

If you provide an email address: it won't be made public. I'll only use it to contact you regarding your comment. No spam, mailing lists, etc.

If you provide a URL then your username will hyperlink to it.