Prim Grid

by ACWraith
Prim mazes on a grid. Identify/remove dead ends.
ID:111447
 
Keywords: development
Prim Grid is a full-blown replacement for my Map Generation library that adds more features. It is made from both my Prim and Grid 2D libraries. It then includes procs related to dead ends.


Dead ends can be identified. These are often decent places to place special items or NPCs.


Alternatively, dead ends can be removed from the maze in order to create a more interesting shape or simply decrease the number of active cells. By definition, they are not blocking any paths.


In some cases, those dead ends might be the only thing we're interested in. The walls between maze paths can be ignored as mere tools for hollowing the room.




PS: I've been noticing that my recent demo files are being shoved into the projects that include their libraries. This library should be fine. I'll upload fixes for the rest soon.
Muhahahaha
I see you're using a good old cellular automata to generate those mazes there ;)
Prim's algorithm simply asks nodes what they could be connected to and then forms a tree of relationships. Nodes are either in the tree, within the list of known neighbors or out of the tree.
Apologies to anyone who suffered a flurry of update alerts, but those demo inclusions in BSP 2D, Grid 2D, Multiple Association List and Prim should be fixed.

Meanwhile, I have made Map Generator invisible on the hub and put a link to Prim Grid on its page.