So, I’m working on scripting a procedurally generated 2D labyrinth. I’ve considered both of the following options, but am curious which would be the most efficient from a resource perspective. Any insight would be tremendously helpful.
Option #1 - Generate an area, subtract backwards from an endpoint to the startpoint and wall off areas accordingly.
Option #2 - Generate the successful path, adding iterative paths for additional dimension, and build additively throughout.
In other words, in option one it would be similar to starting with a solid block of stone and carving the path from end to start, with some additional side paths to flesh it out.
The second option would be to start with a blank slate (a void), generate the solution path, build out form there, then enclose it.
It seems like the second option would allow for more uniqueness (not being generated within a particular boundary of coordinates). But the first seems like, because of having boundaries, it may keep constraints more regular and be less resource intensive.
Any thoughts?