Online 3D Dwarf Fortress map viewer

September 21, 2017

3D view is one if the "bigger" features (alongside sound effects, command bar/voice control, unattended operation and ████) that I ultimately want to add to Dwarf Fortress Remote.

Last year I've already experimented with 3D rendering of Dwarf Fortress maps ([1], [2], [3]) but then took a long break because I wasn't satisfied either with the performance or something else, don't remember. This month I started again from scratch and did things right, so there's more chance Remote will get this feature.

However there was also another part to that project - to make an online 3D map viewer/map archive, sort of a 3D version of DFMA. This is because mobile and browser/WebGL environments are somewhat similar - both are OpenGL ES-based and have constrained resources. Basically I can take iOS rendering code (shaders, mesh building), make just minor changes to convert C to Javascript, and then it works in browser.

So here it is -

mifki.com/df/3dview

You can export your map by copying/pasting a command from the page to DFHack console, or just upload a save if not using DFHack. In either case you'll get a link that anyone can use to view your fort in 3D. I've exported several community games as an example: Constructivory, The City of Air, Breadbowl.

This is a work in progress, some models are missing (namely most of the workshops and furnaces) but otherwise I'm quite happy with it. Obviously a modern browser with WebGL support is required, and right now it won't work on mobile devices becuase I need to support touch controls.


comments powered by HyperComments