What it does
Skylot is a daily building puzzle that lives in a Reddit post.
Each day the post shows a small city lot and two drawings of it, the way an architect would draw a building: the skyline seen from the south and the skyline seen from the east. Every bar in a drawing is the tallest tower in that column or row. You tap lots to stack floors until your city matches both drawings exactly. Matching is easy. Matching with the fewest floors is the puzzle, because one tower can satisfy a row and a column at the same time only when their heights agree. That fewest number is par, and it is shown from the start.
- Ten seconds to get it. Tap a lot and a floor rises in a live isometric model while the matching bar fills. A bar turns green when it is exactly right; a tower turns red when it is too tall for its row or column. The first visit shows a looping 2×2 demo instead of instructions to read.
- A new lot every day. The puzzle comes from the date alone, so every community gets the same lot with nothing to curate. The week ramps from a gentle 4×4 Monday to a 6×6 Sunday with parks you cannot build on. Older posts stay playable as an archive.
- Fair by construction. Par is computed exactly (maximum-weight matching), every generated day is checked to be solvable at par, and the test suite proves the par formula against brute force.
What makes it a Reddit game
Everyone in a subreddit builds from the same two drawings, but there are many valid cities. That gap is the social part.
- "12 other builders in r/yoursub built this exact city." After you finish, the result card tells you how common your city is and how many different cities the community has built so far.
- Where people built. A heat map of the lot shows where your community put its towers, with yours outlined.
- Today in your subreddit. How many builders hit par, +1, +2 or more, and a top-10 board ranked by floors, then time. Boards are per subreddit, so every community gets its own.
- Post to comments. One button replies to the day's pinned thread as you, with your result and your plan hidden behind spoiler tags, so the thread fills with cities people can compare without spoiling the puzzle. Nothing is posted unless you press it.
- Streaks, flair and joining. Daily streaks per user; you can choose to wear your streak as user flair and join the community from the result card.
- A post every day without a moderator. A scheduled job creates the day's post at 00:01 UTC and pins the results thread. Moderators can also post it from the subreddit menu, or post any earlier date to recover a missed day or open an archive lot.
- Logged-out players can play. Progress stays on the device; logging in carries the result over and ranks it.
How we built it
- Devvit Web with the React template: React 19 and Vite for the client, Hono for server routes, Devvit Redis for state, the Reddit API for posts, the pinned comment, user comments, subscribing and flair, and the scheduler for the daily post.
- One pure TypeScript module (
src/shared/puzzle.ts) holds the seeded generator, the exact par solver and the validator. The client uses it to draw the puzzle instantly; the server uses it to validate every submission by regenerating the day's lot, so scores cannot be faked by editing the client. - Graphics are plain SVG geometry: the isometric model is drawn from the height map, floors ease up as you build, and windows light up one by one when you finish.
- Two views. An inline post view that shows today's drawings and a Play button (tap-only, no scroll traps), and an expanded game view that fits the whole building screen into the webview: a phone gets the board full width with the model above it, the desktop popup puts the model beside the board, and nothing needs scrolling until the results card.
- A standalone build runs the real client and the real server routes in one browser page with Redis and the Reddit API simulated, so the whole flow can be played and tested without an account.
- Tests: 365 consecutive dates are checked for determinism, solvability at par, alternative valid cities and difficulty bounds; random 3×3 boards are checked against brute force. An end-to-end script plays several dates on phone and desktop sizes and fails on any console error.
Challenges we ran into
- Making the minimum provable. We wanted par shown up front, which only works if it is always right. The insight that rows and columns can share a tower only at equal heights turned the minimum into a matching problem that a small bitmask DP solves exactly.
- Making two drawings readable on a phone. The drawings sit along the south and east edges of the plan, like an architect's drawing set unfolded around the floor plan, so every bar lines up with the row or column it describes.
- Generating good days. Random cities make dull drawings. The generator rejects days where filling every lot would land near par or the drawings are too uniform, and keeps each weekday's par inside tested bounds.
Accomplishments that we're proud of
- Par is exact and shown before you start, so every player knows the real target.
- The community result is about which city you chose, not just a score.
- Keyboard play, screen-reader labels, reduced-motion support, sound off by default, and no external requests from the client.
What we learned
Daily puzzles live or die on fairness and on what people have to talk about afterwards. A puzzle with one answer gives a score; a puzzle with many valid answers gives a comment thread.
What's next for Skylot
- A weekly "city block" view that stitches each day's most-built city into a skyline for the subreddit.
- Community-drawn lots: moderators or players submit their own pair of drawings, validated by the same solver.
Built With
- devvit
- devvit-web
- hono
- react
- redis
- svg
- typescript
- vite