Hi everyone, based on the feedback on my prototype puzzle (https://news.ycombinator.com/item?id=32884467) I have now built a daily puzzle site, with lots of animation and interactivity.
this rocks also thanks for land of lisp! people like you, why the lucky stiff, and james halliday (substack) are my programming inspirations. seeing people with a passion for making cool, weird, and fun things is so great.
I remember playing this 60 days ago when you released the prototype - congratulations on the official release! The game was a lot of fun, simple enough to be intuitively picked up but complex enough to spend a good 20 minutes trying to solve.
It also teaches the user quite a bit about prioritisation, and the fact it's essentially just a graph problem with multiple constraints which can be solved with a variation topological sort shows how useful algorithmic thinking is in daily life!
I can't view the site at the moment due to the HN hug of death, but I do have a question.
You say these are daily puzzles, are they hand curated by yourself or algorithmically generated - or a bit of both?
I have a heavily-tuned puzzle generator (written in zig) that generates candidate puzzles, which I then lay out with graphviz, then manually refine the layout and curate.
I'm trying to write program to solve it as a practice. I've almost got the algorithm part done, but I have to input the puzzle manually. I wonder if there is a way to automatically fetch and read the puzzle.
I also played the prototype and similarly enjoyed it, and also can't play it now
Something that occurred to me: is there any way - or rather, are there any existing browser features that support - setting up an "alarm" for when a hug-to-death site becomes generally available again?
The difficulty would be not contributing to the deathhug. You could check if it's accessible at all if everyone accessed a server that was itself polling the site every minute, but trying to gauge beyond "accessible" and "not accessible" seems difficult.
Best would be if a site could report its availability status on its own externally. Anyone know of an existing service where you can report the status of your website?
I'm Conrad, the main creator of the site and creator of the puzzle. Happy to answer any questions. The site should run on most modern browsers and phones, let me know asap if you have any difficulty so I can fix!
Hey, congrats on shipping your game! Just a heads up - the first time I loaded up the game on Safari iOS (iPhone 11 Pro) the bottom part of the game was a bit cut off at the bottom of the screen. When I changed the day tabs back and forth it fixed itself.
Edit: it looks like the site is also getting hugged to death by HN.
Yeah, mobile browsers are brutal if you want to use a "make this rectangle as big as possible" layout strategy, because they have multiple "view heights" depending on whether the address bar is visible (since they automatically hide on scroll these days) there is no good solution for this with CSS yet that works on all browsers. I will continue to work on improving that.
The “you have to have someone on the carrot” message sometimes took too long to disappear. Maybe it should fade away once you try to move something else.
The 'i' button brings up the info page, but the words are too large, and the bottom is cut off in my browser (Firefox Nightly on Windows 11). I cannot scroll down to see the rest of the page.
To read it properly, I had to zoom the page (pressing Ctrl + '-' repeatedly).
Love the game. I wish I had taken a screenshot to help describe this, but I completed with 68 moves and in the 15th percentile. On the lower right of the completion page was an illustration of where my solution fit - to me, it looked like the illustration was showing a small number of solutions "above" mine (I assume the 15% of people who took more moves) and a large number "below" mine.
My intuition is that "Higher is better". I would expect my solution to be near the bottom, not near the top. Of course, maybe it's complicated because I have a higher number of moves than most, so maybe the thinking is "higher is higher"?
Minor minor issue. I love the game and I think the stats page is great.
One other issue - it's sometimes hard to select which character you want if both the rabbit and the dog are on the same node.
Yes, this is tricky to fix because javascript doesn't check alpha channels on mouse events for images. I have a partial fix planned to improve this, should be improved in the next few weeks.
My only complaint is that moving one character a long way can be quite awkward with click-drag-drop-click-drag-drop-click-drag-drop. It would be much nicer if you could just drag the whole way then release in one go.
Tip for everyone posting their works to HN – address scaling for your site before it reaches the front page. It can be as simple as pressing two buttons on Cloudflare. You aren't going to get exposure like this often, and you don't want to blow it.
Great puzzle. I liked it so much that I saw your message about going live a few days ago already.
Is there any dynamic content generation involved? I am wondering because the Gateway timeout hints at something behind nginx being the bottleneck. Don't you just serve static files? Maybe you could configure nginx to cache dynamic resources if they only change once a day or even consider turning dynamic resources into static resources by generating them once per day and serving them as static files.
The problem is I'm not big on devops, so I was just hoping "things will be fast enough"
I just modified the server to serve all images from a cloudflare-based source, hope that will help
Also, it's definitely not just static stuff, it tracks full statistics on how people did in the puzzles so they can compete, and I didn't go very deep on optimizing that yet
Now that it loaded again for me, I can see the /graphql endpoint. Caching GET requests to endpoints for a few minutes (or even just one minute) will likely suffice, given that the puzzle is the same for all users. If I am not overlooking anything, stats will lag behind for that period of time in the worst case. More info on how to configure nginx can be found on https://docs.nginx.com/nginx/admin-guide/content-cache/conte.... When a 502 error is served, images or bandwidth are usually not your problem but your backend that is too slow. In your case you probably only need `proxy_cache_path` to define the cache path, `proxy_cache` to specify the zone name you used with `proxy_cache_path`, and `proxy_cache_valid 200 302 1m;`.