Show HN: A unique generated maze to share with your valentine (love.berk.es)
The algorithm, code and setup aims to make it simple - and as always, simple turned out hard ;).
The "about" dialog has some more information on choices made, tech used, inspiration and backgrounds.
Most important, for a tech crowd, I guess is:
- it uses p5.js - I generally prefer just vanilla js and canvas for my generative art projects, but here I wanted to focus on the outcome, not the tooling.
- uses seedrandom with the name of you and your valentine as seed. So a unique, but reproducible maze for a pair of names. Randomness controls the colors, layout and maze generation.
- Yes, the code is a mess still. Refactoring breaks my creative process, so I tend to postpone it (aka forget about it...)
- It uses some browser apis (share, copy, download) that don't work for all browsers in all setups (e.g. copy doesn't work on my firefox android, no idea why).
The source code can be found here: https://github.com/berkes/art/tree/main/lost-in-love
20 comments
[ 2.8 ms ] story [ 50.5 ms ] threadPerhaps use base64 or something to hide the names? I guess it offers no advantage, unreadable names makes it more magic.
I didn't consider that there could be a difference between the link that was shared and the place where you make yours. I just landed on the version that has both in one by happenstance.
But the idea makes sense. It would make it much more of a "I recieved this" and a "here I can make and share mine". I'll have to think a bit more on it, but love the idea.
Thanks!
The one you land, indeed a hash. It is read only, but allows you to trace the maze with the mouse or touch. Once solved, it'll reveal the name of the one who sent it.
Guess I now have 364 days to implement that
https://files.catbox.moe/xru330.jpg
Nice project, btw.
I had a version where I experimented with ways to find the furthest item at the border, but it added little and was very convoluted. For one, to solve this exact issue.
Then I realized that the "bug" could easily be a "feature". Sometimes "finding love" really is just very easy and maybe even boring. So I ditched all the "find furthest" code :)
Thanks for using, and hope you're "path to love" really is this easy IRL (sorry if this is a bit cheeky).
Wish for next year: allow for bulk generation
A lot of kids have to make valentines cards/gifts for their whole class. It would be great for parents to be able to upload a spreadsheet with all the kids names and get an easy-to print pdf (the printed version could also have a short link and QR code)
Certainly a fun idea. Though not that trivial as the entire app now runs client side only. I'd have to think this through, as it should be possible.
https://news.ycombinator.com/item?id=35800492 (May 2023, 117 comments)
you need a keyboard to play it
I'm not aware of such maze generation algorithms. Any pointers? I guess it's mostly a matter of steering the random wall selection initially to form a shape, then continue with the normal stack backtracking algo.
Definitely a cool rabbit Hole to dive into. Thanks for the kind words and cute idea.
I understand that everyone's taste is different. But I went for a form that's visually appealing (to me).
As mentioned in the about, I was inspired by screenprints I saw in a gallery in London, by Ricky Byrne.
https://rbyrneart.com/products/one-day-someday?variant=53387...
I loved the simplicity and how his mazes where visually interesting (to me) through merely color, and composition. This is what I tried to go for. I think I managed quite well, but certainly not as pleasing as Ricky Byrnes artworks.
Though I guess a maze generation algorithm where one can load a mask (png with alpha or BW, for example) would be a cool challenge.