Inspiration
I live in Jeonju, Korea, a city famous for hanji: paper made from mulberry bark, strong enough to fold again and again and thin enough to glow when there is a light behind it. On festival nights the streets fill with hanji lanterns. I wanted a daily game with that feeling: a small, quiet puzzle you solve on your own that ends with something you share with everyone else. Your lantern rises into a sky full of other people's lanterns.
What it does
Every day, everyone in the subreddit gets the same sheet of hanji with holes punched in it.
- Tap a crease (any line between squares) and the smaller side folds over the larger side.
- Light only shines where every layer has a hole. Thick stacks of paper glow dimmer.
- Make the light match today's picture (a sailboat, a fish, a magpie…). Position doesn't matter; mirror images don't count.
- Par is the fewest folds that can solve the sheet. Every fold counts, but Unfold and Flatten are free, so you can explore. A Hint lights up the next good crease, or tells you to unfold when the shape can no longer be made.
When you solve it, you pick one of eight wishes (Health, Love, Luck, Peace, Rest, Courage, Friends, Home) and release your lantern into the subreddit's night sky, over a moonlit hanok skyline. Lanterns from other players drift in live as they solve. Around that moment:
- Today's board (fewest folds, then fastest), First light (the day's first solver) and streaks.
- The community picks tomorrow's picture: each day you can vote between three candidate puzzles for the next day.
- Share your result, or post a spoiler-free result comment from your own account after a confirmation screen.
- Optional streak flair ("🏮 5-day lantern streak") that you can switch on and off.
- An archive of past days to catch up on (archive plays don't change your streak).
A scheduled job creates a new post every day at 00:00 UTC and attempts to pin it when moderator permissions allow. The week ramps up from a gentle 2-fold Monday to 4-fold weekend sheets with bigger pictures.
How I built it
- Devvit Web with an Interactive Post: a light inline card in the feed (tap only) that opens the full game in expanded mode, plus a
_direct_launchentry for game surfaces. - Client: plain TypeScript and CSS, no framework. The sheet is a DOM grid; folds are CSS 3D flips of the moving flap, with crease hit-testing (where two creases cross, the first tap previews and a second tap confirms). The sky is drawn procedurally on a canvas. All sounds are synthesised with the Web Audio API (paper swishes, plucked notes on a Korean pentatonic scale), with a mute toggle. The client is built with Vite.
- Server: Hono on Devvit's Node runtime. The client sends its crease sequence; the server replays every fold on the real sheet and records the result only if the light really forms the picture. Redis sorted sets hold the boards and the sky, hashes hold counts and per-user state, and Devvit realtime pushes new lanterns, solver counts and votes to everyone viewing that day.
- Puzzle engine: a sheet is a grid of paper-layer counts, and folding adds layers (0 = light). Because addition is order-independent, breadth-first search over every fold sequence is small and exact. It gives me provably minimal par and on-device hints.
- Daily content pipeline: a deterministic generator (seeded by date and variant) works backwards. It picks folds, places the picture on the folded sheet, cuts holes through every layer under it, adds decoy holes in hidden layers, and then rejects the sheet unless the paper stays in one piece, no extra light leaks through, and BFS proves that no shorter sequence can make the picture. The pool covers more than a year (403 days × 3 candidates), days that already ran are frozen, and the same generator fills in any day beyond the pool.
- Tests: 31 Vitest tests, including integration tests with
@devvit/test(server-side solve validation, concurrent solves counted exactly once, streak rules, vote changes, one lantern per player) and a full validation of the content pool. - I built it with an AI-assisted workflow (my own agent setup) for coding, testing and playtesting. The core loop was playtested on Reddit and in a phone-sized local browser; automated tests cover the engine and server data layer.
Challenges I ran into
- Making par honest. My first generator compared whole folded sheets, but players think in terms of "make the light look like this". When I switched the goal to light shape only, shorter solutions started to appear, so the generator now proves minimality against the new goal and rejects puzzles that fail.
- Paper that stays in one piece. A picture with enclosed gaps would cut a piece out of every layer. Motifs are checked so they never enclose paper, and every sheet is flood-filled for connectivity.
- Fat fingers on crossings. Playtesting showed that taps where two creases cross sometimes folded the wrong way, and every fold counts. Now an ambiguous tap previews the flap and asks for a second tap.
- Server-authoritative results without friction. Replaying folds on the server rejects invalid solutions while the client stays instant; it does not make the game cheat-proof.
Accomplishments that I'm proud of
- A puzzle you understand in a few seconds, and every daily sheet comes with a mathematically proven par.
- The sky: a calm, shared ending to a daily habit that makes a subreddit feel like a festival night.
- No free text anywhere (wishes come from a fixed list), so there is nothing to moderate. Redis keys containing player identifiers expire 30 days after their last write; public result comments and flair remain Reddit content. The game makes no third-party tracking requests.
What I learned
- Designing backwards from the answer is the most reliable way to generate fair daily puzzles.
- Small data models such as layer counts make exact search practical even on a phone.
- On Reddit, the shared moment after the puzzle matters as much as the puzzle itself.
What's next
- Seasonal skies (Chuseok full moon, Lunar New Year) and themed picture weeks voted on by the community.
- A "lantern wall" of everyone's past pictures and a monthly community constellation.
- Community-made sheets: players draw a picture, and the generator builds and verifies a fair sheet for it.
Built With
- devvit
- typescript