mjrlowe / maze_generator Goto Github PK
View Code? Open in Web Editor NEWA work-in-progress Javascript maze generator module, compatible with both Deno and Node. ๐ฝ
License: MIT License
A work-in-progress Javascript maze generator module, compatible with both Deno and Node. ๐ฝ
License: MIT License
At the moment, the properties related to colors in the display function can only be in the form of hex strings.
Eventually I hope to support all strings which are valid CSS colors (and perhaps even some formats that aren't).
E.g. hexagonal tiles, circular mazes, and irregular shapes.
This will probably require a rewrite of much of the code, so it is more of a long-term aim.
Currently we have two coloring modes: "normal"
, which is just one color, and "distance"
, which colors the cells according to the distance from a certain point.
Here are a few ideas for some other coloring modes that might work well:
I have started this but I still need to get it working.
An option to have multiple start points for some algorithms could be nice.
Algorithms that this would work well with:
I haven't really thought this one through much but something which allows for the creation of loops in the mazes would be cool.
This would be a property, probably a number, which would be passed in when calling Maze.create()
.
E.g.:
let recursiveDivisionMaze = Maze.create({
algorithm: "recursive division",
width: 10,
height: 12,
seed: 28542
})
This should always produce the same maze, provided the other settings are the same.
I am not entirely sure how to implement this though:
Low priority
Some algorithms could have functions that pick neighbor cells to connect to that aren't completely random. Some examples:
This will work best for algorithms like the recursive backtracker, where almost every step we have to make a decision about which neighbor we should connect to.
I don't know much about them so this will require a little bit of research, but hopefully it will make development easier in the future.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.