Show HN: Figure is a daily logic puzzle game (figure.game)
I built the puzzle interface and website in Next.js and React, which was a first for me and overall a great learning experience. The daily puzzle data is queued up in a PostgreSQL table. Another table stores anonymous solve stats. Once a day, a cron job hits a serverless API that promotes the next puzzle as “live” and prompts Next.js to update the prebaked static site with the new data. The game state is managed with Redux and your stats are persisted to localStorage. Framer Motion for animations. Styling is mostly Tailwind CSS. I use Figma for design and Logic Pro to make the sounds.
I get a lot of questions about how the puzzles are generated. It’s not super sexy. I generate random grids of tiles and then run them through a brute force solver (sounds rough but the puzzles don’t feel anything). Every few days, I play through puzzles that look promising based on the solution space and pick some good ones to go into the queue. The rest are sent back to the void (again, painless).
I’ve spent a little bit of time tinkering with a procedural generator, but so far the random ones are better. The downsides of the random approach are (1) the curation effort required, and (2) the high variability in puzzle difficulty. I have a feeling there’s a whole body of math and CS knowledge where Figure is an example of something that I don’t know the name for (imposter syndrome intensifies).
As for the future of Figure, I feel strongly about keeping it free of ads, login walls, in-app purchases, or anything else that infringes on enjoyment or privacy. I’d also like to make sure Figure is accessible to everyone. English isn’t exactly required to play, but translations for the UI and website would be nice. I’ve tried to build Figure to be friendly to people who have color vision deficiency and people who rely on screen readers and keyboard navigation, but I have no idea if it’s actually any fun in these cases.
Here are some miscellaneous thoughts…
1. It’s been surprisingly satisfying to build a web game with a modern frontend stack. I’ve noticed a lot of grumbling on HN over the years from OG web developers who yearn for the days of semantic HTML, a sprinkling of CSS, and vanilla JS. I was in that boat too and have grumbled plenty about the breakneck pace of frontend evolution. One of my goals with this project was to pick some popular frameworks and give them an honest try. I’m now a believer, but there’s still no way I can keep up with all the progress.
2. I found Tailwind awkward at first, but after a while I realized I was using Figma a lot less and just designing in code with utility classes, which is great for focus and flow. Having lived through the Web 2.0 standards revolution, it was hard to let go of some deeply rooted opinions about semantic purity, but overall I’m sold.
3. I really love side projects. At most jobs, you’re pushed toward specialization. Side projects allow you to build out a generalist skillset, which makes you better at your core job function and better at collaborating with others. It’s also liberating to explore and pivot around without time pressure. Figure started out as a 3D fidget toy in Unity where you fling projectiles at floating objects…
4. I made this game on my trusty 2013 MacBook Pro, which has been almost completely sufficient (ahem Docker ಠ_ಠ). I’ll probably get an M2 Air soon, but I’m reluctant to say goodbye to the best computer I’ve ever owned.
5. I’m very grateful for the people who build and maintain open source projects. It’s also delightful how many paid services offer generous free tiers to let developers play around: Figma, GitHub, Vercel, Supabase, and Pipedream, just to name a few that I’m currently using actively. If you work on FOSS and/or these excellent platforms, thank you.
Anyway, hope you like it. Happy to answer any questions.
116 comments
[ 3.4 ms ] story [ 201 ms ] threadBtw, you can share the page with a reminder app and set up daily notification.
That said, the visual design is beautiful, and it’s inspiring that somebody was able to create this.
I do wonder what the minimum required moves to complete a level is, but it seems it would be at least close to 11. How many moves did it take you?
I also find it takes me a few tries on puzzles like this to see if I really like them, so hopefully if you try some harder ones in the future you’ll enjoy it more.
For comparison, the median number of tries it took people to solve yesterday's puzzle (10 moves) was 7. Figure #35's median was 19 tries! Today's puzzle is definitely one of the easier ones, fwiw.
I've vaguely noticed some patterns of tile arrangements that create interesting sequences that are nontrivial but solvable if given some thought. I would love to develop a more formal system where these patterns are used to build up puzzles with more intent than the random boards I'm currently making. If this sort of thing is in anyone's wheelhouse, I'd love to hear from you.
Also this breakdown by Game Maker’s Toolkit: https://youtu.be/2zK8ItePe3Y
As for your comment about nontrivial puzzles - absolutely! 100% agree - the joy in a lot of puzzle games like bejewelled is unexpectedly clearing half the board with a clever move!
* Solve two pieces
* “Oh, maybe if I did it the other way around I could get that in one” <Reset>
* “ok that worked but I wonder if it’s different if I did this…” <Reset>
* “Ok actually all of those have been exactly the same number of moves, but how about if I just reset and do the first again?” <Reset then complete>
I just mean I’m not sure I would class the above as “4 attempts” to show difficulty as you are just using it to test scenarios (ie the above person found it trivial even though it took four ‘attempts’)
This kind of problem is known as planning in old AI, and it's languishing. most techniques are just variations of A*, with things like symmetry detection and heuristics tailored to game benchmark problems. It's the kind of thing (IMO) that deep RL fails at, since unlike Chess or Go where your solution-finding simply needs to beat a competitor, here your solution needs to be exactly correct (and ideally minimal.) It's very sparse.
I did realize while reading this that I could get a little more sophisticated by finding out the number of moves in a best solution using an aggressively optimized fast solver. If that number is within a range that's fun to play, say 8-11 moves, then go ahead and find all the rest of the solutions with the maximum brute force. If not, then just scrub the whole thing since I wouldn't use that puzzle anyway.
Edit: ok, there are a few more dependencies, but they really easily resolve on their own.
I think whether to do that is a design choice, though. The current setup puts a penalty on clearing center columns early, effectively splitting the game in two.
[1] https://en.wikipedia.org/wiki/Column
What a great mnemonic, I’ll start using it even though I typically don’t mix the two up! Thanks a lot.
I could sit here for an hour playing them but was done in a few minutes.
In fact I don’t think I’ve seen any that allow you to play past day’s puzzles.
That said, there has been consistent feedback that people want to play old puzzles, myself included. At least for me, the replay value is actually pretty solid after a few days' opportunity of forgetting the solution. So the next big feature I'm working on is the puzzle archive. Stay tuned!
I suspect this combo of a new daily puzzle and the complete archive will be the winning implementation over time.
[1] https://www.andrewt.net/puzzles/cell-tower
I think it would be cool to have two options for solves (1) Limited retries but a higher allowed number of moves and (2) Unlimited retries but requires perfect solves. Let people pick which category they wanna try....but they gotta pick which they're going for prior to seeing the puzzle!
The "share score" screen would then advertise which version they went for and a friend group can compete the same way.
HN isn't like IndieHackers or Twitter. Not all ideas/wordle clones are good and worthwhile. HN allows criticism against crypto projects, twitter, any meta products, etc.. so why not this logic puzzle game? It is not against the rules to say "the idea lack any originality. Thousands of games are like this exist". There's no further critique necessary.
2. The animation is actually quite misleading, given the absence of rules. When you pick a tile from the bottom row, tiles that will be part of the new bottom row (or touching a tile on the new bottom row) become solid before they slide down to the bottom. (This may only be detectable on slow devices. Unfortunately, the animation for your game is extremely slow and janky on my Android phone from 2019.) This gives the impression that my touch has somehow transformed them, and I spent probably a dozen "games" frustratedly trying to figure out how they were being transformed before I realized that it was just a misleading animation.
IMO the way it should work is that the removed tiles should disappear, then all tiles should slide to the bottom, and only then should tiles newly located on the bottom become solid.
https://www.nytimes.com/2022/01/31/business/media/new-york-t...
- To see the decline, here are some links:
https://trends.google.com/trends/explore?q=wordle
- Look at the decline of tweets per day found here:
https://mobile.twitter.com/WordleStats
I was honestly surprised to see it had declined, since Wordle still shows up in top ten Google trends on almost a daily basis.
Honestly indifferent, thought Wordle was doing better, but I do believe in quantifying trends via notable significant sources; again, if you’re able to think of any, for example NYT article covering it’s grow since being acquired, I would be interested.
As for Google Trends, I actually think those are some good numbers. Considering what the 100% peak represents in absolute terms, 40% of it is still very solid. I think it's more informative to look at the trend in the context of other search terms. Pick any of the news major stories that have captured the public's attention over the past few months: Russia's invasion of Ukraine; Depp v Heard; Roe v Wade. Wordle is crushing them all. Indeed it seems the only thing more viral than Wordle is COVID. Maybe we'll see some official numbers from the Times at some point but in the absence of anything concrete I suspect they are happy with their purchase.
In any case, do I think Figure can match the meteoric rise of Wordle? It's statistically unlikely. Can it be profitable? I'm no expert in game monetization but for the OP's sake I hope so. I like it.
Wordle (and some other games) do a mandatory pop-up of the instructions just to make sure first-timers understand the rules. This game didn't -- I see now that there's a small question mark at the upper left -- but "clear everything", and then seeing that things disappeared when I clicked on them, was kind of enough. If I really thought about it, I might even say that was part of the fun for me -- figuring out the rules of the system and considering what strategy to use.
I wonder if that could be part of the game -- like on some days, "gravity flows to the right", like the view of the puzzle has been tilted by 90 degrees. (And some days it's up?) Or maybe you can rotate the puzzle by 90 degrees -- so you can transform the right or left side column into the crucial bottom row. Maybe a mystery square, that doesn't have a color or is all colors or switches colors with each click?
Anyways, this game was fun, and had a nice-looking interface. Glad you had fun building it. (Someone once asked me how to monetize a side project, and I said "add it to your portfolio and use it to land a high-paying job.")
One thing, just curious: did you look intwo whether your privacy notice is GDPR-compliant? Sounds more like frank talk than legalese, haha
Here's a quote from https://gdpr.eu/privacy-notice/ (emphasis mine)
> If an organization is collecting information from an individual directly, it must include the following information in its privacy notice: