Twin Mazes
An alternative layout method is to use a 3-edge tileset to create two independent mazes on the same grid. We only need 33 of the available (3^4)=81 tiles. So Twin mazes use a reduced 3-edge tileset.
1 | 3 | 4 | 9 | 10 | 12 | 13 | 27 | 28 | 30 | 31 | 36 | 37 | 39 |
2 | 6 | 8 | 18 | 20 | 24 | 26 | 54 | 56 | 60 | 62 | 72 | 74 | 78 |
0 | 40 | 50 | 70 | 80 |
Here are the 33 required tiles and also their equivalent Wang tiles for reference.
A default layout would look like this:
See Stage for more random twin path mazes. Both Bridge and Trench mazes are 'perfect' and independent of each other. After maze generation, some alternative 'link' tiles are added to the Brench array only, see Twin tilesets.
Link tiles
They can only be added where the steps align correctly on two sides of an empty grass tile. The tiles 'link' the upper Bridge and lower Trench mazes. |
Weave 'cross' tiles
If a more random weave effect is needed, then alternate 'cross' designs for both tile-50 and tile-70 can be randomly substituted. Bridge/Trench have no alternatives because a bridge can only appear above (or over) a trench. Pipes can have alternatives. The Route tileset can have alternate 'cross' tiles with road barriers open or closed. |
Alternate tiles
Tileset | Tile-0 'link' |
Tile-15 'weave' |
Tile-5 'straight' |
Tile-10 'straight' |
Brench | none | same | same | |
Pipes | ||||
Route | none | same | same |
Stage: Random Twin 2-edge 'Bridge & Trench' Tileset