An experiment with maze generation, started off in Rust, then ported to js to make it a web-app.
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
wruzaa month ago
Maybe add friendzone checkbox to generate dead end mazes.
berkesopa month ago
It'd be even nicer if the maze is potentially (un)solvable in that case: you'll have to keep trying to find out if its a friend-zone.
Rikudoua month ago
Well, I'm glad my gf is not called Juliet, it would be a boring maze!
https://files.catbox.moe/xru330.jpg
Nice project, btw.
berkesopa month ago
Thanks!
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).
Minor49era month ago
Sometimes the path to love is clear
remrama month ago
I got a similar one with my own name.
gus_massaa month ago
I think the version with names https://love.berk.es/?me=Romeo&you=Juliet should be read only.
Perhaps use base64 or something to hide the names? I guess it offers no advantage, unreadable names makes it more magic.
berkesopa month ago
Interesting idea.
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!
berkesopa month ago
I gave it some more thought and want to take it a step further even (but lacked the time to polish before valentine)
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
ericyda month ago
The generated maze is pretty easy, but I think this project succeeds at being fun, whimsical, visually appealing, mobile-friendly, and (seemingly) fully functional. Nice work.
nicoa month ago
Great work. Very fun to watch and surely a cute gift to give or send
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)
berkesopa month ago
I wasn't aware of this whole class thing. Is it an American thing?
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.
nicoa month ago
Definitely an American thing, yes, haha
admingirla month ago
It would be cool if the pattern to solve the maze has both people's initials/names in it.
berkesopa month ago
Ooh. Do you mean that if you solve it, it resembles a letter?
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.
croisillona month ago
i was expecting this repost:
https://news.ycombinator.com/item?id=35800492 (May 2023, 117 comments)
you need a keyboard to play it
berkesopa month ago
Oh, mine is certainly not even close to that one :)
croisillona month ago
don't downplay yourself, many of us liked your creation!
zvra month ago
Surely having the maze being in the shape of a heart instead of a boring square would have produced better responses...
berkesopa month ago
I deliberately did not make the maze in a shape, but kept it square.
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.