New Version!

Hi everyone! I've added a new version that come with several new features. Let's get to it!


  • Added two new algorithms to the program: Prim and Growing Tree. The way the Recursive Backtracking algorithm works you usually get long corridors and paths and not a lot of small "dead-ends". These two algorithms solve the problem and add more variety.
    • Prim: This algorithm adds several small "dead-ends" and creates a more confusing maze. The contrary of the Recursive Backtracking.
    • Growing Tree: This is definitely my favorite because he can mimic the behavior of the last two algorithms with a simple change in the code and even alternate between them during the maze creation. He will have an extra argument, that determines how he will behave when creating the maze. You can input 5 values in this argument:
      • 100: The algorithm will behave 100% as the Recursive Backtracking.
      • 75: The algorithm will behave 75% as the Recursive Backtracking and 25% as the Prim.
      • 50: The algorithm will behave 50% as the Recursive Backtracking and 50% as the Prim.
      • The algorithm will behave 25% as the Recursive Backtracking and 75% as the Prim.
      • 0: The algorithm will behave 100% as the Prim.

  • Added the option to add entrances to all four sides of the maze. Just like the border argument, 0 means there will be no entrances and 1 adds the entrances.
  • I've made a lot of small changes to the code, most of them just optimizing and fixing some mistakes. The main change is that I introduced a break statement to the repeat loop that contains the algorithms. That way, as soon as the maze is finished, the repeat loop ends, preventing any unnecessary  code from running.  The other change I made is before starting the algorithm I increase the grid size by 2 in each side. This prevents the code from going outside the grid, which didn't stop the code form running, but it slowed down. When the algorithm is done the grid size is set back to normal.


  • Create a documentation/instruction document to better explain the contents of the project
  • Add an executable program to test the features outside GameMaker

If you have any questions or suggestions/requests feel free to share them below! Thank you!


Random Maze Generator_v2.gmz 15 kB
Dec 27, 2017

Get Random Maze Generator

Download NowName your own price

Leave a comment

Log in with to leave a comment.