Back to Browse

[Maze Runner] Dynamic maze generation using Prim's algorithm

15 views
May 10, 2026
0:24

- Prim’s Algorithm is traditionally used to construct a Minimum Spanning Tree (MST) in graph theory. - While thinking about how to generate a maze automatically, I came up with the idea of adapting Prim’s Algorithm into a maze generation system by treating grid cells as graph nodes and walls as edges. - Instead of using edge weights, the system randomly expands paths through unvisited neighboring cells while maintaining overall connectivity, allowing the maze to generate unique layouts every time the game starts. - This project became a meaningful experience in creatively applying graph algorithms to actual gameplay systems and procedural generation.

Download

0 formats

No download links available.

[Maze Runner] Dynamic maze generation using Prim's algorithm | NatokHD