[Utility] Maze Generator Script

TEMPLATE NAME: Maze Generator
CORE VERSION: Unknown
TEMPLATE VERSION: 1.5.0

TEMPLATE DESCRIPTION:
This is a script that will give you a randomly generated maze of the size of your choosing (If you decide to go above size 40, be aware that it could get pretty laggy).

Tunable Properties:
-Maze Size
-Wall Frequency
-Stopping the algorithm early

To swap out materials for the walls and floors, you can edit the cell and edge templates.

TEMPLATE VERSION NOTES:

V1.5.0 - 12.14.2019
-Updated the script so that it can spawn the maze in a static context, if the script is placed in a static context.
-Created separate templates for each edge of the cell.
-Made it so the edges of the cell are spawned during the generation, instead of having their visibility manipulated.

V1.4.0 - 12.12.2019
-Made the RandomDirection function less expensive.
-Made it so that the algorithm takes place across multiple frames to prevent it from exceeding the instruction limit.
-The maze size is now clamped at a maximum of 100, to prevent people from going overboard.

V1.3.0 - 12.12.2019
-Removing a print statement I accidentally left in.

V1.2.0 - 12.12.2019
-Added functionality for stopping the generation algorithm early.

V1.1.0 - 12.12.2019
-Made the frequency of walls a tunable property, to allow for more open or closed areas.

V1.0.0 - 12.11.2019
-Initial version. The code is not optimized and it's a bit ugly here and there. I plan to update it next week.

MEDIA:




ADDITIONAL INFO:
If you have any requests or issues with this template, please feel free to ping me either here or on Discord

3 Likes