Inspiration
We've have been developing games for over twenty years, but this project started with high school nostalgia. Back then, my friends and I spent countless hours playing Pusoy back in the Philippines. Recently, we noticed a trend on social media where people were posting their Pusoy hands and challenging their followers to find the most optimized card arrangements. This social puzzle dynamic sparked the idea for a daily competitive puzzle on Reddit.
Initially, the concept was simple: deal players a single 13-card hand each day. However, after playtesting, we realized that solving just one hand was too fast and left players wanting more. We decided to use the entire 52-card deck, splitting it into four distinct 13-card puzzles. This structure keeps players engaged while giving them the flexibility to solve all four puzzles, complete just one, or drop in and out as they please.
What it does
PusoyPro is a daily card puzzle game played directly inside Reddit. Every day, a seeded deck of 52 cards is dealt to all players. Players must arrange their cards into three rows (Front, Middle, and Back) of 3, 5, and 5 cards respectively, following standard Pusoy rules: the Back hand must beat the Middle hand, and the Middle hand must beat the Front hand.
The game scores player arrangements using a custom scoring system based on Pagat.com, rewarding players with extra points for building difficult hands in specific rows. Once players submit their solutions, the serverless backend automatically posts or updates a scorecard comment in the Reddit thread showing their score, current streak, and a spoiler-masked breakdown of their hands. Players can also track their standings across Today, Week, and Streak leaderboards built directly into the game.
How we built it
We built PusoyPro using a modern stack designed for fast-loading, secure web games inside the Reddit app:
- Frontend: Phaser 3 and Vite, providing a native-feeling canvas interface that loads quickly within Reddit's mobile and desktop apps.
- Backend: Powered by Reddit's Devvit platform using Hono and tRPC for secure, type-safe API communication between the client and serverless runtime.
- Data Storage: Uses Reddit's built-in Redis to track daily leaderboards, weekly rankings, and player streaks.
- Social Integration: We integrated native Reddit actions directly into the game results, such as subscribing to the community and sharing scores.
To prevent cheating, the backend performs verification checks. The client sends the card arrangements to the server, which validates the hand configurations and recalculates the scores to ensure player submissions are authentic.
Challenges we ran into
Developing for embedded mobile WebViews inside social apps presented several unique engineering challenges:
- WebGL and WebView Rendering Glitches: We ran into a persistent issue where tapping or sorting cards caused a distracting full-screen flash in certain WebViews. We tracked this down to WebGL MSAA (multisampling anti-aliasing) conflicts and resolved it by disabling MSAA in Phaser's config. Similarly, we had to write custom CSS overrides to suppress the default WebView long-press selection flash on the game board.
- Mobile Input and Layout Constraints: Touch dragging can feel clunky in an iframe, so we implemented a clean tap-to-place fallback system. We also adjusted scroll behaviors so that desktop Reddit page scrolling worked smoothly over the game canvas instead of trapping the pointer, and raised the mobile action row to prevent viewport clipping.
- State and Session Handling: Managing state in a serverless environment required handling edge cases, such as preventing logged-out players from accidentally sharing progress or state, and pinning daily posts in Redis so the subreddit highlights tracking system functioned correctly.
Accomplishments that we're proud of
- Polished User Experience: We successfully eliminated rendering flashes and mobile touch lag, creating a smooth card game loop inside an embedded Reddit iframe.
- Daily Engagement Loop: The automated scorecard comment updates in real time on Reddit, which sparks friendly competition in the comment section.
- Robust Anti-Cheat Validation: The scoring engine runs server-side on Devvit, ensuring that players cannot forge arrangements or inflate their scores.
What we learned
With two decades of game development experience, we used this hackathon as an opportunity to experiment with modern AI-powered coding assistants. Working alongside agentic coding tools allowed me to quickly prototype the Pusoy scoring engine, wire up tRPC endpoints, and set up state management. It was a great way to learn how developer workflows are evolving.
We also got to learn the ins and outs of Reddit's Devvit platform. We learned how to structure inline views versus expanded views, and how to optimize game initialization so that the start screen pre-deals cards and loads instantly in the Reddit feed.
What's next for Pusoy Pro
- RPG Progression and Player Levels: We plan to introduce experience points, player levels, and unlockable card avatars. Players will be able to progress their careers, choose playstyle roles, and display special badges based on their historical scoring achievements.
- Friendly Challenges and Social Rooms: We want to allow players to invite friends to head-to-head matches using Reddit private messages, letting them compete on the same deck seeds in custom mini-bracket rooms.
- Daily Power-ups and Modifiers: We want to introduce optional daily modifiers or puzzle power-ups, such as a single-use card swap, safety-net undos, or double-score risk options to shake up standard puzzle strategies.
Built With
- claude
- devvit
- hono
- node.js
- phaser.js
- redis
- typescript
- vite
- zod
Log in or sign up for Devpost to join the conversation.