https://github.com/apmem/mazegenerators
https://github.com/apmem/mazegenerators
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/apmem/mazegenerators
- Owner: ApmeM
- License: mit
- Created: 2020-10-31T19:44:08.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-02T07:55:30.000Z (over 1 year ago)
- Last Synced: 2025-01-30T00:28:34.624Z (over 1 year ago)
- Language: C#
- Size: 277 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
==========
- [**Rooms and mazes**](https://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/) - How to generate maze with rooms
- [**Pixel dungeion**](https://github.com/watabou/pixel-dungeon) - Images in demo