Inspiration
We wanted to create a game that was truly native to the spirit of Reddit—built by the community, for the community. Inspired by user-generated level-building games like Super Mario Maker and the haunting, community-connected elements (where you see where other players perished), we created Trapline. It's an asynchronous, collaborative gauntlet where every obstacle you face was placed by a real player who cleared it before you.
What it does
Trapline is a daily-reset platformer gauntlet.
- The Gauntlet: Players run through a level filled with community-placed hazards (spikes, swinging saws, flying bats, jumping frogs, patrolling walkers, and popping slimes).
- The "Hook" (UGC): If you clear the gauntlet, you earn the right to place exactly one new trap anywhere along the line, making the course harder for the next player.
- Community Markers: If you fail, a gravestone is left at your exact coordinates of death, showing future runners where others fell.
- Retention Loop: Levels reset every 24 hours to a new procedurally-generated theme. Players compete on a daily sprint leaderboard to keep their survival streaks alive.
How we built it
We built Trapline from the ground up using a modern, scalable web stack:
- Game Engine: Phaser 4 utilizing WebGL rendering for high-performance visual effects.
- Backend: Reddit Devvit Web SDK with a Hono web server and tRPC for type-safe client-server communication.
- Database: Redis for high-speed, atomic state locking, leaderboard tracking, and daily level persistence.
- Visual Styling: Retro-style Kenney assets enhanced with dynamic custom shaders (volcanic heat haze, pixelate screens, and stackable toon outlines for a cel-shaded feel).
Challenges we ran into
- Preventing Impossible Levels: With crowdsourced obstacle placement, players could easily block the finish line entirely. We solved this by implementing a backend validation heuristic that guarantees a mathematical path of fairness (checking spacing buffers and timing-sensitive margins) before allowing a trap to be saved.
- Keeping Pixel Art Sharp: Standard camera filters in WebGL route textures to offscreen framebuffers which blur when scaled. We optimized the scaling system by restricting WebGL filters to lazy-load only during success/failure transitions, keeping normal gameplay nearest-neighbor crisp.
- Mobile Responsiveness: Fitting a platformer inside diverse Reddit feed viewports is tough. We rewrote the canvas manager to dynamically adjust the camera zoom based on vertical bounds while auto-adjusting camera scroll limits during layout shifts.
Accomplishments that we're proud of
- Zero-Delay Retries: We local-cached the daily level data on the client so that when you die, the retry is instantaneous—no reloading spinners or API delays, keeping the game fast and highly addictive.
- Cel-Shaded Visual Juice: Integrating stackable outline shaders underneath the neon warning halos gives the cartoon sprites a highly premium, hand-drawn look.
What we learned
We learned how to design webview-based games that feel native and performant within host application shells. Optimizing asset sizes and relying on procedural graphics where possible allowed us to keep the feed-facing splash screen incredibly fast-loading.
What's next for Trapline
We plan to add:
- Custom Character Cosmetics: Unlockable skins and trail colors based on survival streaks.
- Subreddit Theme Customization: Allowing subreddits to style the daily level palettes to match their community colors.
- More Trap Varieties: Introducing gravity-wells and moving lasers to add even more strategic choices.
Log in or sign up for Devpost to join the conversation.