Maze Info (WIP)

Generator | GitHub Repo

Table of Contents

Introduction

This project was greatly helped by Think Labyrnth!, Jamis Buck's blog, and the maze generation algorithm Wikipedia article.

Cell Shapes

Algorithms

To better understand the following pseudo-code:

  1. Every cell starts with none of its walls broken.
  2. There exists a set containing every cell in the maze.
  3. To connect two neighboring cells is to break the wall that separates them.
  4. For a cell to be visited is for it to have at least one broken wall or for it to be the starting cell.

Custom Grids

If enabled, equations and inequalities can be used to create custom grid shapes. This is accomplished using the math.js evaluate function. For every coordinate in the specified dimensions, the equation or inequality will be used to check whether or not to place a cell there. The top left cell on the first floor has coordinates of (0, 0, 0) and coordinates increase going to the right, down, and to the following floors. To represent the width, length, and height of the grid, the variables w, l, and h are used respectively. For the coordinates of the cell being checked, x, y, and z are used. In order for a custom grid to be legal, it must be possible to connect every cell.

Example: "x/w <= z/l" would result in a right triangle with legs spanning the left and bottom sides of the grid and its hypotenuse being the diagonal starting from the top left.