Finally figured out Depth-First Search :D

Well, finally got off my lazy butt and starting trying.

Depth-First Search is a surprisingly easy way to generate a maze. This pseudocode helped me a lot. <3

Probably the hardest part about this was generating the GUI. :L

1 Like

That amazed me

I wonder to this day what kind of games can you make from a maze…

Pathfinding type algorithms can be fun. Here’s a neat toy I wrote using an HTML canvas with some javascript last fall:

[code]

+-
+-0
Speed: 50 +-
diag: ON
stop
animate
[/code]
just save it as whatever.html
it uses a flood fill (dijkstra’s algorithm/bfs) to find the shortest path from the start to end, and you can draw pixel walls in the middle. You can choose to turn off the automatic solving and animate the solution and slow it down. If there is no solution, it also has the ability to utilize a variable number of bridges to skip over a barrier. It was a neat toy.

Now do Wilson’s algorithm :smiley:

I made a sort-of maze generator which is more like a labyrinth generator. It’s based on linked lists and is pretty cool. It’s also procedural, and I generated an infinitely-sized labyrinth with it, and ending up breaking ROBLOX.

EDIT: whoops, forgot link: test - Roblox

Make It work in parts now B)