Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on May 16, 2011 4:09:26 GMT
I decided to improve the maze application I made previously with the HTML5 canvas element and so I made a maze generator using the depth first search algorithm. Everything except for the starting point is random. You can make a maze of any size, but my computer was having a really hard time handling a 1000x1000 sized maze. You can also right click on the maze, then click "View Image" (if you are using FireFox, should be similar in other browsers), and then save the maze as an image if you for some reason love the maze and want to keep it (or print it ;P ). A completely random maze will be generated every time you press "Generate Maze" or refresh the page. Use the arrows keys to move the blue circle throughout the maze. xtriad.comxa.com/applications/canvas_games/maze/maze.htmlIf I am in the mood, I'll make the app animate the maze creation process, and then add a solver. Let me know what you think, and if you find the mazes are hard or not.
|
|
|
Post by Obsidian² on May 16, 2011 9:52:46 GMT
THAT MAZE WAS EXTREMELY HARD!
Partly because my arrow keys suck, and that its confuzing... I did one straight path all the way untill the end when one pixel was blocking me... Im pissed now...
|
|
Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on May 16, 2011 18:03:31 GMT
Good to hear that it wasn't easy since a lot of the mazes are fairly simple. Blocking one path at the very end would be a nice feature to have on all the mazes, but you just got unlucky with that maze since that usually doesn't happen (at least with the mazes generated on my computer). ;P
Thanks for trying it out.
|
|
|
Post by moneyman18 on May 16, 2011 18:38:28 GMT
It is defiantly better than the previous. I found it pretty easy though as most of the non-direct paths were short and I could see that they were dead ends so I new exactly which way to go. Only suggestion would be to make the non-direct paths a bit longer if possible so it isn't exactly obvious which way you have to go to get to the end.
|
|
Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on May 16, 2011 21:48:25 GMT
It is defiantly better than the previous. I found it pretty easy though as most of the non-direct paths were short and I could see that they were dead ends so I new exactly which way to go. Only suggestion would be to make the non-direct paths a bit longer if possible so it isn't exactly obvious which way you have to go to get to the end. Yep, that's what I have noticed, but I have an idea of why they are so short so I'll have to play with the algorithm some more.
|
|
prads
Elite Poster
[M:0]
It's a shame that PI isn't an integer :(
Posts: 361
|
Post by prads on Jul 27, 2011 4:28:25 GMT
The way it generates new maps every time, that's genius.
I just went through random paths and solved the maze in a minute or so. WTH! lol
|
|
xcessive
Epic Poster
.[M:5000]
Posts: 526
|
Post by xcessive on Jul 27, 2011 8:58:00 GMT
Implement A*, thats always fun. It was a real bitch the first time I tried getting A* to work on a 2d array based grid.
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Jul 27, 2011 16:50:40 GMT
Great work! I've never messed around with it, but one thing I see is that false paths (the paths that are not the correct ones) seem to never be longer than a couple of blocks, so it is pretty easy to navigate through just by looking ahead a few blocks. You probably already know that though EDIT: I guess Moneyman already said that
|
|
|
Post by (/iPokemon/) on Jul 27, 2011 20:13:47 GMT
Haha, that was fun! Took me maybe 45 seconds to do the first one I got! Nice work, as usual.
|
|
Kenneth
VIP
Spam Sweeper [M:0]
Posts: 561
|
Post by Kenneth on Aug 10, 2011 14:49:23 GMT
Can I feel smart if I beat the 50 75 one?
|
|