16 October 2015

Javascript maze based dungeon generator library.

Source Code At

github

Usage

var width = 93;
var height = 93;
var mazen = new Mazen(width, height);

mazen.generate();

var x, y;

for (y = 0; y < height; y++) {
    for (x = 0; x < width; x++) {
        var terrain = mazen.getMap(x, y);

        switch (terrain) {
        // DO SOMETHING
        }
    }
}

DEMO

  • Nothing

  • Wall

  • Room

  • Corridor

  • Entrance

  • Descending Stair

  • Ascending Stair