Naive 3d map generator

Whipped up a system so I could create arbitrary chunks with arbitrary connections for a Diablo-like, snap-together mapgen system for Slashcards.  It was a tricky bit of linear algebra to test if the bounding box of a chunk translated and rotated by potential joint connections would intersect with existing chunks.  Below, red boxes are failed checks.

Check out the super naive demo:

2 thoughts on “Naive 3d map generator”

  1. Thats super neat looking!

    There seems to be a lot of dead ends though. Maybe they can be prioritized for reconnecting, or have extra treasure, or bosses?

    Is the result a tree from the start point or a graph? Perfect mazes are usually boring, but I like to start with those when I do level genreration.

    1. You nailed it. there’s 0 logic other than “can i fit here y/n”, so the result is a tree. Even with prioritization this approach is tough to generate interesting + useful layouts. You don’t get a lot of the nice looping-back and well-connectedness of other mapgen approaches like the ol’ rogue 3×3. It’s more like a tree root network, which means a lot of backtracking to the hub to go down another vein.

      I’m all ears if anyone has suggestions.

Leave a Reply