Inspiration
We wanted to create a game that felt like a seamless blend of classic art history, casual puzzle fun, and Reddit’s signature sense of community humor. The concept of "Where’s Waldo?" meets classical paintings felt like a perfect fit. However, daily puzzle games often suffer from content bottlenecks. We asked ourselves: What if the community generated the content they play?
By giving users a native tool to draw pixel cats and vote on their favorites, we transformed CatSneakin from a simple search-and-find game into a self-sustaining ecosystem where player creativity directly feeds the gameplay.
What it does
CatSneakin is a daily interactive puzzle game hosted natively on Reddit.
- Daily Puzzles: Every day, a new public-domain classical painting (sourced dynamically from the Metropolitan Museum of Art) is posted.
- Intruder Hunting: Players must pan, pinch-to-zoom, and tap to find sneaky cats camouflaged inside the artwork. Puzzles feature three difficulty tiers (Easy, Medium, Hard).
- Global Leaderboards: Players compete against the clock to secure their rank, earning a score based on time and penalty seconds.
- Built-in Art Studio: Players can design their own custom cats using a fully responsive 48×48 pixel art editor.
- Community Gallery: Submissions go into a community gallery where Redditors vote on their favorites. The top cats are programmatically merged into future paintings, becoming the next generation of hidden intruders.
How we built it
CatSneakin is built using a modern client-server model on the Reddit Developer Platform (Devvit):
- Frontend: Built with React, TypeScript, and Vite. We wrote custom pan/zoom touch logic to handle high-resolution image interactions on screens of all sizes.
- Backend: Powered by a Hono router on Devvit, communicating with Reddit Redis to handle daily scoreboards, user session tracking, rate-limiting, and voting.
- The Pipeline: A custom Python asset-generation script pulls paintings from the Met Museum API, analyzes local color palettes, and seamlessly embeds community-drawn pixel cats into coordinates.
The Scoring Math
To keep the leaderboard competitive, we calculate a player's final score \( S \) by adding a 5-second penalty for every incorrect attempt \( A \) to the total elapsed time \( T \) in seconds:
$$ S = T + (5 \times A) $$
We also use Euclidean distance to verify click precision. A guess at coordinates \( (x_c, y_c) \) is marked correct if its distance to the hidden cat's coordinates \( (x_i, y_i) \) is within a radius \( r \) determined by the level's scale:
$$ d = \sqrt{(x_c - x_i)^2 + (y_c - y_i)^2} \le r $$
Challenges we ran into
- Screen Real Estate & Viewports: Massive classical paintings (often 3000px+) and a 48x48 pixel art canvas are incredibly difficult to make playable inside a restricted mobile Reddit webview. We solved this by rebuilding our canvas to use percentage-based styling (
aspect-ratio: 1/1) and touch-movement translation rather than hardcoded dimensions, giving the game a natural, native feel. - Dynamic Visual Blending: Pasting random pixel art onto 18th-century oil paintings looked artificial. We had to design an algorithm to sample the local RGB value of the painting's coordinates and match it with a community cat asset of similar value, ensuring they are truly camouflaged.
Accomplishments that we're proud of
- The UGC Loop: Building a complete, working pipeline where a player's drawing is submitted, voted on, processed, and programmatically hidden in future levels.
- Flawless Performance: Achieving instant, lag-free zoom and pinch gestures on mobile webviews, which usually suffer from browser container latency.
- Responsive Canvas: Designing a 48x48 grid editor that is just as easy to draw on using a thumb on mobile as it is with a mouse on desktop.
What we learned
We learned how to design webviews that respect the strict performance and storage limits of the Devvit platform. Managing data payloads effectively (like compressing drawing histories and coordinates) is vital when querying state against Reddit’s Redis database in real time.
What's next for CatSneakin
- Themed Weeks: Introducing specialized eras (e.g., "Impressionist Week" or "Renaissance Week") with custom-matched cat templates.
- Creator Badges: Awarding unique profile badges and in-game achievements to creators whose cats successfully get voted into a live painting.
- Advanced Editor Tools: Adding custom palettes, gradient shading brushes, and layers to let players construct even more detailed intruders.
Built With
- devvit
- hono.js
- pil
- react
- redis
- tailwindcss
- typescript
- vite