A tutorial on how to create perfect mazes for your game, including Phaser 3 plugin and demo code.

Article by Richard Davey. Posted on 1st Feb 2019.   @phaser_


This is a great tutorial by supernapie all about creating procedural mazes in Phaser 3 using a combination of a handy npm package and a custom Phaser 3 plugin: "A nice way to add variety to your game is random levels. In this article i will explain how i made the mazes for Esciit and Acid Sink.

Straight to the point: I didn't figure out the math to create these mazes myself. Actually I only had to implement an existing npm-package called generate-maze and visualize the output with Phaser objects. The package is a javascript implementation of Eller's algorithm. The algorithm is said to create 'perfect' mazes, with a single path between any two cells.

The generate-maze library only generates a two-dimensional array of maze cells, which have the following properties..."

Read More