Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for Herding Cats
Inspiration
"Herding cats" is what it feels like to get a group to agree on anything, which is also what a subreddit is. I wanted a daily puzzle that is learned in one swipe, takes a minute or two, and gives a community something to compare and argue about afterwards, the way a crossword or Wordle does.
What it does
Every day at 00:00 UTC the app posts a new room. Swipe (or use the arrow buttons or keys) to tilt the room: every cat slides at once until it bumps into furniture, a wall or another cat. The room is solved when every cushion has a cat napping on it. Fewer moves, more stars.
- A real weekly curve. Monday is a 5x5 "Catnap" with two cats and par 4. It climbs to Saturday's 7x7 "Fiendish" room.
- Measured difficulty. Each room is generated from the date and accepted only if a breadth-first solver proves its shortest solution is exactly that day's par.
- First solve counts. Undo and Reset are free, replays are for fun, and the server replays every submitted path before recording it.
- See how everyone did. A histogram of the community's move counts with your bar highlighted, your percentile, the top herders, and your streak.
- A post that feels alive. A live ticker shows who just herded the room and in how many moves.
- Watch the best solve. Once you have solved the room, replay the day's best solve tilt by tilt on your own board. It is only unlocked by a verified solve, so it is never a spoiler.
- Comment my score. One explicit tap posts a spoiler-free score line to the thread from your account.
- Build a room. A touch-friendly editor with a live solver: it tells you the par as you place furniture, cats and cushions, or that the room cannot be solved. Publishing creates a new playable post from your account.
- Ranks and flair. Herd more rooms to climb from Kitten Sitter to Cat Herding Legend, and wear your rank and streak as subreddit flair with one tap.
- Community Sunday. The most upvoted player-built room of the week becomes Sunday's daily, credited to its author. Reddit's votes choose what everyone plays.
- Open to everyone. Logged-out players can play the whole game; logging in adds streaks, the leaderboard and publishing.
How I built it
Devvit Web with React on the client and Hono on the server.
- A shared TypeScript engine (slide rules, BFS solver, seeded generator) runs on both sides, so the builder validates rooms instantly and the server can re-verify everything.
- Redis holds each post's room, first-solve paths, a sorted-set leaderboard, the histogram and streaks.
- A Devvit scheduler task posts the daily room; a per-date lock keeps it to one post if the scheduler, install trigger and moderator menu overlap.
- The inline feed view is a light preview with a single button and no gesture handling, so it never traps scrolling. The full game opens in expanded mode.
- Light and dark themes, hand-drawn SVG cats, small synthesized sounds with a mute toggle, and reduced-motion support.
Challenges
- Making difficulty honest. Random sliding puzzles are either trivial or impossible; searching the whole state space and choosing cushion layouts at an exact depth fixed that.
- Keeping user actions respectful: commenting and posting only ever happen from a clearly labelled button, and nothing in the game is gated on them.
Accomplishments I'm proud of
- A puzzle you understand in one swipe that still gets properly hard by the weekend.
- One art style end to end: hand-drawn furniture, blinking, stretching, napping cats, synthesized meows, and a silly name for every room ("The Windowsill Conspiracy").
- Player-built rooms that are guaranteed solvable before they are posted.
What I learned
Devvit Web's split between a light inline view and an expanded view is the right shape for a feed game: the post has to read in a second, and the game needs room. Sharing one engine between client and server made cheating checks and the level editor nearly free.
Try it on Reddit
Open the playable demo post and select Herd the cats. Use the arrow controls, keyboard or a swipe to tilt the room. The test subreddit has Reddit's Devvit Admin Helper App installed for judge access.
Demo video · Devvit app listing · Public source and README
What's next
Weekly leagues between subreddits, flair for long streaks, and themed furniture sets voted in by the community.
Built with
Devvit Web, React, TypeScript, Hono, Redis, Vite
Built With
- devvit
- hono
- react
- redis
- typescript
- vite
- web-audio-api