3Dwarf

Description

3Dwarf is a 3D visualizer for an otherwise 2D game called Dwarf Fortress. The game is an insanely deep simulation that includes goodies such as deformable terrain and fluid mechanics. A while back, another amazing addition was made to the game: a Z-layer! This means the game is now 3D, but the interface still remains 2D ASCII.

My goal was to turn something that looks like this:

Into this:

When I started this project I didn't know much about OpenGL and displaying thousands of polygons at once. I did manage to naively implement some concepts such as grouping batches of geometry, only sending to the card geometry that is in front of the camera, and really basic terrain culling. Unfortunately, the main drawing method is still immediate mode. Once I've learned more OpenGL tricks I'm going to revisit this project and do it justice.

This is also the first time I got to play around with memory hacking. Any visualization I wanted to do had to be completely passive, and the easiest way to get terrain information ended up being stealing it directly from memory as the game runs.

Downloads

win32 binary : here
source : here

Coverage

Release thread: here
TIGSource coverage: here

Media

The following is a video I made to cover the basic functionality of 3Dwarf: