maze_generator: 0.1.0 and beyond... #237
mjrlowe
started this conversation in
Show and tell
Replies: 3 comments 4 replies
-
Wowee this looks really neat! 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is so cool! That colored maze is unlike anything I've ever seen before. What gave you the idea to create something like this, and what is your favorite maze generation algorithm? |
Beta Was this translation helpful? Give feedback.
3 replies
-
This is super cool! Great work. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone, I just released version 0.1.0 of maze_generator, a Javascript module (compatible with Deno, of course) for generating mazes that I've been working on over the last couple of months.
You can use it to generate mazes with 12 different algorithms (I've just added true Prim's and 10print) and there are at least two more algorithms coming soon.
maze_generator is probably the least useful package on nest.land but I would say it's the most fun! It's also very easy to use. Printing a maze to the console is as simple as
Maze.create().generate().printString()
.Here's two examples demonstrating the kinds of images that maze_generator can create:
[
.display()
currently only works in a HTML document with a canvas element.]A 60x60 10print maze.
displayMode
is set to2
(line drawing).This one is using the recursive backtracker algorithm, starting in the top left. In the display settings,
displayMode
is set to1
,strokeWeight
is set to0
andcoloringMode
is set to"distance"
. Essentially you are seeing the cells coloured according to the distance from the top left cell, and walls aren't drawn.This update also introduces
Maze.createWidget()
, which creates a little interactive HTML widget (inspired by this). This only works in the browser (at least for now) and I still need to do some work on it, but it should be useful for embedding maze generator programs into webpages.I have a bunch on features planned--including braid mazes, weave mazes, directional bias, seeds and hopefully eventually I will implement mazes of different shapes. I also still need to fully document a couple of features.
Feedback and contributions are welcome: like most people I'm new to Deno and also this is the first module, so I might not have implemented best practices.
I'm enjoying seeing the Deno and nest.land community develop and I look forward to hearing anything you have to say about my hobby project!
Beta Was this translation helpful? Give feedback.
All reactions