Description

DEMO:

http://www.mediafire.com/file/wehbh38xj95cu6s/SimpleMazeGeneratorDEMO.zip

This is maze generation script, it using algorithm called as Recursive backtracker.

It's very simple to use: put somewhere in create event, initializing function and you done :)

maze_ds_grid = huder_mazeGen(width,height,noBorder,leftEntrance,rightEntrance,topEntrance,bottomEntrance,spaceMin,spaceMax, spaceSize, symmetryMode);

Possible settings:

  • You can set size of maze width and height separately.
  • You can determine whether your maze will have open borders or not.
  • You can determine which maze's edge will have entrance.
  • You can set amount of random holes that will be digged (spaceMin, spaceMax) and its size (spaceSize)
  • You can set whether maze is symmetric on x, y or both axis.

Pack contains example of generating maze and re-generating, drawing maze and how to get position of entrances (if they exist)

Arguments:

  • width -- Width of the maze expressed in tiles number not pixels
  • height -- Height of the maze expressed in tiles number not pixels
  • noBorder -- Whether maze will not have borders
  • leftEntrance, rightEntrance, topEntrance, bottomEntrance* -- Set which maze's edge will have entrance
  • spaceMin,spaceMax -- The amount of random holes placed within maze
  • spaceSize -- Size of digged random holes
  • symmetryMode -- 0 means no symmetry, 1 means x symmetry, 2 means y symmetry, 3 means xy symmetry

Returns: Return index of created (ds_grid) data structure that will contain integers representing generated maze (0 - floor or 1 - wall).
Also this script will create 2 arrays mazeEntranceX[], mazeEntranceY[] these arrays can be used to check position of each entrance. If value is equal to -1 that means there is no entrance. use 0 for left, 1 for right, 2 for top, 3 for bottom entrance within array [] brackets.

End User Licence Agreement (EULA).

Changes in 1.0.2

  • Function name changed to huder_mazeGen()
  • New argument added "spaceSize" size of empty holes that are placed randomly

Version 1.0.2. Published March 18, 2017

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Gravatar

davide m 25 February 2016

Freaking awesome!

I probably tried every single MP asset which deals with maze-dungeon generators (cellular automata etc), and i have to say this one developed by Huder is the best. It's blazing fast, it's perfectly structured, it's very well commented and it's absolutely flexible.
I'm using it in my game and i'm superhappy with the results :)

This review was left for a previous version of this asset.


Gravatar

Ben H 21 September 2014

Easy to use and well written!

I'm happy with the amount of commenting included in the script. The code uses GML best practices. I've only given 4 stars because of some confussion when trying to output to an executable. This is probably beyond Huder's control and is just one of those Beta Marketplace issues that will need to be addressed by Yoyo Games at some point. The product does what it claims to do.

This review was left for a previous version of this asset.


Gravatar

John B 25 September 2014

Good Script

Easy to use. The developer is available to offer product support. Script can be used by anyone, from beginners to advanced coders.

This review was left for a previous version of this asset.

What is the issue?

Back to Top