Space Map
Design the Space Map as shown below:

This is a binary Map, which means you put
- one Ceiling Tile
- one Floor Tile
That’s it for the generation. Feel free to put invisible Events for background effects, e.g., screen toning or weather.
Additional Maps
Additional Maps can be put as a child map below your Space map to add new features. They are optional.
This feature is optional. If active, the generator will draw one or more roads to connect the map’s exits.

The rules of the Shadings Map apply. Example:

JavaScript Call
Using this code, you can enter your map and have a first look.
const args = { }
$mapGenerator.custom("cave", args)
.withExit("top")
.withExit("bottom")
.spawnPlayerAt("bottom")
.generate()
.finalize()
Arguments
You can add arguments to the „args“ instance in the code above. All arguments are optional.
Argument | Example(s) | Description |
---|---|---|
drawAreas | true false | If false, only Paths are drawn. Default: true |
border | true false | Draws a smooth border towards the map’s end. Default: true |
scale | 10 | The higher this value, the more zoomed in a map looks like |
minValue | 0.55 | The higher this value, the smaller the areas will be |
n_nodes | 10 [5, 15] | Number of nodes that the algorithm will connect with paths, either as a fixed value or as an array [min, max] (both inclusive) |
n_randomEdges | 1 [0, 2] | Additional corridors to create alternative solutions to the map, either as a fixed value or as array [min, max] (both inclusive) |
thickness | 3 [3, 5] | The thickness of every corridor, either as a fixed value or as an array [min, max]. Only values from 1 to 5 (inclusive) are supported. |
roadThickness | 4 [4, 5] | see above |
roadMode | „angular“ „smooth“ | How roads are created |
const args = {
scale: 10,
n_nodes: [5, 15]
}
$mapGenerator.custom("cave", args)
.withExit("top")
.withExit("bottom")
.spawnPlayerAt("bottom")
.generate()
.finalize()
Let’s continue
Now you can continue by drawing e.g., Walls, decorations, or events.