https://github.com/rob1997/mazegenerator
Procedural Maze Generator
https://github.com/rob1997/mazegenerator
Last synced: 4 months ago
JSON representation
Procedural Maze Generator
- Host: GitHub
- URL: https://github.com/rob1997/mazegenerator
- Owner: rob1997
- Created: 2021-02-04T20:36:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T20:53:45.000Z (over 5 years ago)
- Last Synced: 2025-04-08T19:53:46.965Z (about 1 year ago)
- Language: ShaderLab
- Size: 1.46 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Procedural Maze Generator
A procedural Maze Generator the uses the Hunt and Kill Algorithm
- Can generate upto a 45 * 45 maze (more than that casues a stack overflow error because the algorithm uses recurssion)
### `MazeGenerator.cs`
- `_cells[x, z]` : is a 2 dimensional maxtrix representing all the cells of the maze
- `size` : is an Integer Vecotr2 (`IntVector2`) representing the x and z size of the maze
- `cellUnitSize` : is how wide a single cell is (a cell must be a square)
- `cellPrefab` : is a prefab of a singular cell with all 4 walls
### `Cell.cs`
- `coordinate` : an Integer Vector2 that is the location of the cell in cell units
- `walls` : a list of the `Wall` struct that contains the `Direction` enum a wall is facing and transform of a wall
look at the Demo scene
