Skip to content

ApmeM/MazeGenerators

Repository files navigation

MazeGenerators

MazeGenerators is a set of helper classes to generate different types of mazes.

Examples

Dynamic example can be found here: https://apmem.github.io/MazeGenerators/Godot.html

Here are a few examples of mazes that can be generated:

Maze that contains rooms.

Regular tree maze.

Game of life generator.

Usage

Fill in GeneratorSettings data with required values.

    var maze = new Maze(10,10)
        .TryAddRoom(true, 2, 5, 5)
        .TryAddRoom(true, 2, 5, 5)
        .TryAddRoom(true, 2, 5, 5)
        .TryAddRoom(true, 2, 5, 5)
        .GrowMaze()
        .GenerateConnectors()
        .RemoveDeadEnds()
        .BuildWalls();

Algorithms

CustomDrawAlgorithm - Add custom shapes of any type (fillrect, rectngle, point)

DeadEndRemoverAlgorithm - Remove dead ends - path tiles that have less then two paths connected

FieldGeneratorAlgorithm - Create field and check input parameters for correctness.

LifeGameAlgorithm - Generator based on "game of life" to create

MirroringAlgorithm - Mirror existing maze Horizontally/Vertically/Both or rotate it around center

RegionConnectorAlgorithm - Generate connectors between rooms and paths through empty tiles (EmptyTileId)

RoomGeneratorAlgorithm - Generate unconnected rooms

StringParserAlgorithm - Print and parse maze to/from string

TreeMazeBuilderAlgorithm - Generate unconnected maze paths in free spaces

WallSurroundingAlgorithm - Build walls around all passages, junctions and rooms

Credits

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages