⚙ Swift Mazes - About

⚙ Swift Mazes is a framework to generate 3D dungeons from textual (Unicode or ASCII) floorplans. It reads a config file, some prefabs, and then generates a fully working 3D dungeon map for The Dark Mod, dmaps it (via TDM), and packages it together as a playable .PK4 file - all automatic!

Overview over the framework

The framework also enhances the engine via scripting objects and adds new features. These are all optional, of course. Examples: ambient light local to player, doors with variable speed, pressure plates, spike traps, per-location fog etc.

Randomization is also supported, both at level-generation time as well at run-time. This makes replaying a map more interesting, and also frees the mapper from manually decorating every corner.

The goal here is to make it easier to create playable FMs, without having to spend months within DarkRadiant.

The generated maps do have a grid-structure and focus more on puzzle solving and exploration, than trying to re-create a realistic scenery. However, games like Legend of Grimrock show that even "simple" level design can be rewarding and fun for the player.

View some screenshots or go to the download page for a working demo.


⚙ Swift Mazes has no fixed map format, instead it reads a "Symbol Map", which defines which symbols in the actual floorplan corrospond to which prefab. It then reads one or more locations, which are then connected together. Each location can have multiple levels (floorplans that are stacked on top of each other). From that the script generates the necessary list of prefabs, then assembles the 3D map from this. Here is an example:

Consider this symbol map, which creates definitions for the various symbols used in the map, and how they map to prefabs:

;Char As Base             As Wall  As Corner  On Wall  Description
.·    -                   -        -          -        Solid space (inaccessible)
%20   empty               -        -          -        Empty Hallway
S     empty, pstart_east  -        -          -        Start, facing east
X     empty, exit         -        -          -        Exit area
□     pit                 -        -          -        Hole down
▣     plate               -        -          -        Pressure plate
■     pit_bottom          -        -          -        Hole in the ceiling
┌┐┘└  -                   wall     -          -        Solid wall, ignored otherwise
                                                       (_north, _south, _west, _east)
─│    -                   wall     -          -        Solid wall
                                                       (_north, _south, _west, _east)

And here is an example floorplan using the symbols from above:

[Level 0]
·│S▣□ X│·
·└┐ ┌──┘·

Multiple floor levels are of course supported, as well as multiple locations. Each location is one "location" in TDM, meaning it can have a different ambient light, ambient music, a name, a different fog etc.

And here is how that looks in game, using some basic prefabs:

Here are two editor shots of a bigger example map, showing the different locations and the 3D layout: