6 ms·
This, I presume, it's the perfect opportunity to promote my own maze generator[1], which incidentally is a Real Application that you can run on your own compute
by moses-palmer 3y ago
This, I presume, it's the perfect opportunity to promote my own maze generator[1], which incidentally is a Real Application that you can run on your own computer, and the output of which you own!
Like the linked application, it supports triangular, rectangular and hexagonal grids, and different generation algorithms, which can be combined for various areas of the final maze. It also supports background and mask images to colourise rooms and provide a shape for the maze, as well as a small selection of effects to apply. The output format is either SVG or PNG.
And for that extra HN cred, it's written in Rust (which you are free to ignore if you're not into RIIR, but this is in fact a rewrite of an earlier Python project of mine)!
[1]: https://github.com/moses-palmer/labyru https://github.com/moses-palmer/labyru
- thih9 3y agoIs there a web demo?
- moses-palmer 3y agoNo, you'll have to exercise your own CPU I'm afraid!
- addandsubtract 3y agoYour readme is pretty thin on information. How do I even run this? How can I configure the parameters?
- moses-palmer 3y agoA kind soul contributed an update to the README---basically the output of `cargo run --bin maze-maker -- --help. I guess today's lesson is: do promote your personal project even when it's semi-arsed, because people on the Internet are mostly kind and will help you improve your documentation!
- popey 3y agoA friend of mine does coding live streams on Twitch. It's pleasantly surprising how many randos (who become internet friends) will help out with your projects.
- replyifuagree 3y agoMany human engineers get happy chemicals from helping people! Also many humans!
- pj_mukh 3y agoBasic question: What would be the simplest way to "digitize" one of these mazes i.e. turn them into a programmable data structure (2D array, matrix, etc.) for example to use as input into a maze solver/RL demo?
- moses-palmer 3y agoThe main application is actually a thin wrapper around a library that does exactly that, so the best way would be to not perform the final step of turning the data structure into an image.
- llagerlof 3y agoWhat are the methods available? --method <METHOD> The initialisation method to use
- joshbuckler 3y agoLooks like "braid", "clear", "branching", or "winding" https://github.com/moses-palmer/labyru/blob/master/maze/src/initialize/mod.rs#L136 https://github.com/moses-palmer/labyru/blob/master/maze/src/...
- moses-palmer 3y agoYeah, I was hoping the `clap` macros would perform some unthinkable magic there... I will have to update the help with a listing. In the mean time, have a look here[1] for the possible values. [1]: https://github.com/moses-palmer/labyru/blob/7b92be3ae279a9ff752b2b266da7725e59c69811/maze/src/initialize/mod.rs#L107 https://github.com/moses-palmer/labyru/blob/7b92be3ae279a9ff...
- linkdd 3y ago`clap` does have magic for enums: use clap::{Parser, ValueEnum}; #[derive(ValueEnum, Debug, Clone)] pub enum Foo { Bar, Baz, } #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] pub struct Args { /// description #[arg(short = 'f', long = "foo", value_enum, default_value = "bar")] foo: Foo, } The output of `--help` will look like: -f, --foo <FOO> description [default: bar] [possible values: bar, baz] This is with clap >= 4.4 with the derive feature.
- andruby 3y agoI'd love to see a screenshot before downloading/installing.
- abound 3y agoIt's a command line program that outputs SVGs. Here's an example: https://paste.sr.ht/blob/d248dd89f96c6de981bf0870265a63be8e127398 https://paste.sr.ht/blob/d248dd89f96c6de981bf0870265a63be8e1... (download and open with a browser/SVG viewer) The invocation to generate that was: ./maze-maker --width=50 --height=50 --method braid,branching,winding out.svg
- junon 3y agohttps://codepen.io/junon/pen/Rwdwqxg https://codepen.io/junon/pen/Rwdwqxg For anyone who can't render SVG in their head :)
- josephcsible 3y agoCan you add a license?