2
\$\begingroup\$

This question already has an answer here:

I need an algorithm that can generate mazes with these requirements:

  • Allows for random structures to be made (Ex: a center spawn area, objective points and 'Caverns (corridors with 2 or more entrances and a width > 1)' )

  • Generates paths from structures to required connections

  • Can be implemented in Python with relatively little difficulty
  • No extra modules (unless supports Python 3.5.5)

As an example, the objectives would look like this in game (I use integers to store the walls in the ray caster):


2 2 2 2

2 0 0 2

2 0 0 2

2 2 2 2


I also tried looking on wikipedia and I found this semi-helpful link but none have helped me achieve this so far.

\$\endgroup\$

marked as duplicate by Pikalek, Tyyppi_77, DMGregory Nov 12 '18 at 20:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ The phrasing of this question looks a bit like homework. While we're happy to help you in learning the material, we generally try to not simply hand out a complete solution to the assignment. Can you tell us a bit more about what you've tried so far, what's gone wrong, or where you're stuck, so we can help you overcome those specific obstacles? \$\endgroup\$ – DMGregory Oct 30 '18 at 12:16
  • \$\begingroup\$ so far, I am doing this as a personal project, and i am stuck with multiple maze generation, where the maze won't go around the obstacles I inserted. I am currently hand-making the maze for the ray caster i am making, but i would like to speed this process up with an algorithm. \$\endgroup\$ – question asker. Oct 30 '18 at 15:43
  • \$\begingroup\$ Also related: Algorithm for generating a 2d maze. \$\endgroup\$ – Roflo Oct 30 '18 at 18:29