Share My Creation Maze generator...

Hi,

Here is a very light contribution for those who would need to generate
maze(s).
It generates a random maze. You can choose horiz and vert size.
The maze has always a solution :
after the random generation step, the program do a "fill", localise parts of
the maze that could be unaccessible and open a "door".

WW
 

Attachments

  • Maze.zip
    1.9 KB · Views: 728
  • Image1.jpg
    28.3 KB · Views: 4,862
Last edited:

Spacewalker

Member
Licensed User
Longtime User
does your program generate this maze as an image (ie. JPG..) - or can the maze somehow be used in a game ?

So for example if I wanted to add a circle into your maze and move it...would that be possible...?

Heinz
 

skipsy

Member
Licensed User
Longtime User
Hi,

I forgot to mention that the sub SHOW_MAZE is usefull to display the maze
only.
Of course you you can draw anything you want on MAZE_DISPLAY canvas !

The image displayed is just here to illustrate a result.

The program generates the maze in a 2 dimension table that can be used in
a game.
In the table, 1 is a wall, 0 is a corridor.
Entrance and exit are created on left and right but you can change this
(line 155 to 167).


WW
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…