⚠️This site is a mirror of Guy Walker's Stagecast⚠️

A common requirement in many games is for a tileset that can be used to create a maze. Player and enemy sprite movement is constrained to the pathways. I'is best if the maze is fully connected (perfect) so there are no isolated or unreachable areas.
See creating a perfect maze for more details.

path tileMaze - random path

First, a simple maze is created using the same code as Lattice. Each cell can contain up to 4 characters (one per exit). This is compacted to a single tile by giving each exit a value of 1, 2, 4, or 8 and calculating the sum of all the exits (between 0 and 15).

Secondly, the sim shows the maze in 9 different tilesets. All tiles are 'fossilised' ie they have no rules, as this would slow down the sim. So an 'agent' is used. When added to the maze, it traverses the paths converting all tiles to the next tileset.

See Tiles page for tilesets.

Path Tiles Stage

Play Sim     View Stage

Controls:

None for this sim.
The sim will cycle through all tilesets.
Select 'Reset' to build a new maze layout.


pipe tileMaze - random tree

This sim uses the same 10 tilesets as above but creates a growth or tree maze where all paths grow out from a single tile.

All path ends grow out simultaneously, until blocked by occupied cells. No paths fuse with another.

5 out of 6 times path ends do nothing. This gives a more random tree-like structure to the maze.

See Tiles page for tilesets.

Path Tiles Stage

Play Sim     View Stage

Controls:

Sim will loop.
Use buttons on right to select next tileset.

Sims