What it is
Lamplight is a short daily puzzle for Reddit. A 5×5 grid of lanterns is half dark. Tap a lantern and a small shape of lanterns around it flips — lit goes dark, dark goes lit. Light every lantern in as few taps as you can. Everyone in the subreddit gets the same puzzle each night, so the comments can become a shared scoreboard.
Why it is built for Reddit
- The community writes tomorrow. When you finish, you vote on tomorrow night's rule. Three of the five shapes (Plus, Saltire, Halo, Quad, Line) appear on the ballot. The winning shape becomes the next night's puzzle and is named in the post title (tonight's live post is “Lamplight #5 · Plus night: light every lantern”).
- A spoiler-free comment. One button posts your result under the daily post as you: stars, moves vs par, time, and streak, with no board spoiler. On today's live run the in-game toast read “Posted to the comments.”
- A shared square. The result card shows how many lamplighters lit the square tonight, how many were perfect, your streak, your rank, and the top five.
- Streaks. Finishing on consecutive nights builds a streak, shown on the result card. If the subreddit has user flair enabled, the app also requests a
🏮 N-night streakflair after a finish (it is skipped if flair is off or the API call fails). - Little work for mods. Installing the app creates the first night's post (a Plus night). A Scheduler task is set to
0 0 * * *(00:00 UTC) to publish each new night from the community vote. A moderator menu item can post tonight's puzzle once if needed. No settings are required.
Daily content that stays fair
Every puzzle is generated from the date and the voted rule, then solved with an exact GF(2) minimum-tap solver. The puzzle is always solvable, and the displayed par is the true minimum number of taps. The generator keeps par in the 4–9 range (in unit tests, most rules landed between 5 and 9; Line can be 4). Unit tests cover all five rules across 120 days each (600 puzzles): every one is solvable and the displayed par matches the solver. A separate brute-force check on the Plus rule found no shorter solution than par.
Undo and Reset are free. A Hint shows one correct tap and adds 2 to your effective score, so a hint never beats a clean solve.
How it feels to play
Play is a single screen in the Reddit post. The board shows a flame on each lit lantern, not only a colour change. On desktop, hovering a lantern previews the shape that will flip (this is in the live demo video). A one-line hint under the board names today's shape. After the last tap, a short win glow leads to one result card, with a countdown to the next night. If the viewer prefers reduced motion, animations are disabled.
Logged-in play, voting, and sharing were confirmed end-to-end today on the live post (a 7-move finish against par 5, one undo, a Quad vote with visible bars, and the share toast). The server will also let a logged-out visitor finish a puzzle for fun without storing anything; voting and sharing still need a Reddit login. That logged-out path was tested in the local preview, not on the live post.
How we built it
- Devvit Web, with an inline splash in the feed and an expanded game view (React 19 + Vite).
- A Hono server on Devvit, Redis (sorted sets for the nightly leaderboard, hashes for votes and streaks), and the Scheduler for the nightly post. Comments are posted with
asUserso they appear as the player. - The server replays the player's taps against the official puzzle before it accepts a score, so a win cannot be faked from the client.
- The generator and solver are pure TypeScript with unit tests. A local preview server with an in-memory store was used to exercise play, hint, vote, share, and the next day in a headless browser before upload.
Challenges
Making “light every lantern” feel fresh every day without hand-authored levels — solved with seeded generation plus a community vote for tomorrow's rule — and keeping every score fair and verifiable on the server.
What's next
More rule sets, weekly community-voted themes, per-sub seasonal streak boards, and (if the platform allows) a nightly reminder.
Not a port
Lamplight was written from scratch during the hackathon period (all of the app code was created on 2026-12-05). It is not a port of an existing game.
Built With
- devvit-scheduler
- devvit-web
- hono
- react
- redis
- typescript
- vite