Inspiration

Once we knew the Hackathon theme, one punny idea immediately stuck with us: “Subreddit Surfer”. From there, we explored a range of directions, from fast, mechanically-driven gameplay inspired by Subway Surfers to something more cerebral, inspired by the Wikipedia Game.

In the end, we gravitated toward a puzzle-focused experience that emphasized associations and community discovery. Not long after, the frog theme emerged as a natural (and delightful) contextual layer.

We like frogs.

What it does

Sub-Ribbit Surfer is a daily puzzle game built as a Devvit app where players navigate between subreddits by hopping through connections. Think "Six Degrees of Separation" but for Reddit communities. Each day, a new puzzle is generated: given a start subreddit and an end subreddit, find a path between them by choosing from connected subs at each hop. Explore connections and discover new subs!

How we built it

1. Graph Construction - Mapping Reddit's Subreddit Network

The game is powered by a graph of subreddit connections stored in Redis.

  • ~600 hand-curated seed subreddits across 35 categories ensure broad, balanced coverage.
  • Crawling via BFS: For each subreddit, we discover connections from three sources: sidebar descriptions (r/ mentions), Community List Widgets (mod-curated related-sub lists via reddit.getWidgets()), and hot posts (titles, bodies, and cross-post URLs). Every discovered sub is validated through Devvit's Reddit API - must be public, non-NSFW, 5k+ subscribers, no blocked keywords.
  • Chunked execution: To avoid server-side execution timeouts, the full graph build is broken into scheduled chunks - each job processes multiple subreddits, saves all progress to Redis, and schedules the next chunk. Category-aware round-robin ensures diverse coverage. The full build completes over many chained jobs.
  • Weekly rebuilds: The entire graph is rebuilt from scratch every week via Devvit's scheduler, keeping subreddit data and connections fresh and exciting.
  • Result: A graph with thousands of subreddits and tens of thousands of bidirectional connections.

2. Puzzle Generation - Finding Interesting Paths

Not every pair of subreddits makes a fun puzzle. The generator ensures quality through multiple filters:

  • Bidirectional BFS finds optimal paths between random pairs of subreddits.
  • Yen's K-shortest paths finds alternative routes, so players have meaningful choices instead of a linear corridor.
  • Quality scoring: Evaluates hop count, number of alternative paths, branching factor, and single-hop penalties (linear forced-choice sections). Puzzles that don't meet thresholds are rejected.
  • Puzzle pool: Batch-generated puzzles are quality-ranked in a Redis sorted set and drawn highest-quality first to determine the post of the day.

3. Game Client

The client is vanilla TypeScript + CSS bundled with Vite into Devvit webviews:

  • Animated intro: Countdown sequence with a path reveal between start and end subreddits, setting the stage before each puzzle.
  • Dynamic lilypad layout: Grid algorithm calculates optimal placement based on viewport size, with auto-scaling text and random jitter for a natural feel.
  • Progress trail: A live icon bar tracking visited subreddits, giving players a visual sense of their journey toward the goal.
  • Power-ups:
    • Hint Bug: Appears when struggling; eliminates non-optimal connections.
    • Blink Beetle: Teleports you to a random node! Chance of appearing increases with hops over the optimal path.
  • Scoring: Logarithmic decay formula penalizing extra hops and time, with a 5-star rating system.
  • Audio: Custom AudioManager using Web Audio API for contextual sound effects.

4. Devvit Platform Usage

  • Redis: Used to store the graph, puzzle pool, per-post leaderboards, game state persistence, user avatar caching, subreddit info caching.
  • Scheduler: Powers all automation - chunked graph builds, puzzle generation, daily posts, weekly rebuilds, replacement puzzles.
  • Reddit API: Subreddit validation, widget/post scanning for graph building, user avatars, custom post creation, and live subreddit info for the Discover tab.
  • Menu items (mod-only): Graph building, puzzle pool management, scheduler controls, and testing utilities.

5. End Screen

Four victory tabs: Stats (score, rating), Leaderboard (sorted set with sticky "find me" card), Graph (canvas visualization of player path vs optimal), and Discover (community info + top post for the end subreddit, as well as a call to action to visit it!).

Challenges we ran into

One of our early challenges was understanding the scope of data available to us through Devvit and determining how to best leverage it. Clarifying those constraints took time and influenced several design decisions along the way.

Defining what actually makes a “good” puzzle required experimentation, particularly in establishing rules for graph construction and generating puzzles dynamically from that structure. Balancing the game also proved to be an ongoing challenge. Calibrating scores, power-ups, and progression was a delicate balancing act.

On the presentation side, visualizing subreddit maps in a way that was readable, intuitive, and performant required several iterations. We think there is still a lot of room for growth on this front!

And finally, ensuring a consistent experience across platforms - from dynamic pad layouts and viewport-aware scaling to font rendering differences and audio playback - introduced additional technical hurdles that we worked through under tight time constraints.

Accomplishments that we're proud of

We’re especially proud of developing a distinctive content generation model that keeps the experience fun and fresh. We also successfully distilled the platform’s unique strengths into a focused, engaging gameplay loop, ensuring the concept felt both authentic and streamlined. On top of that, we secured original frog-themed music that adds energy, personality, and charm to the overall experience.

What we learned

We learned that a tight timeline can be a creative superpower. Rapid iteration pushed us to make decisions quickly, trust our instincts, and focus on what truly mattered.

More importantly, we realized how much we enjoy building together; riffing on ideas, embracing the weird ones, and pushing each other toward something better. And yes, the real win might actually be the friend (lover) we made along the way.

What's next for Subribbit Surfer

  • Core Gameplay Improvements
    • New Bugs (Power Ups)
    • Scoring balance adjustments
    • HUD / Tracker Widget adjustments
  • Post Game Improvements
    • Map Stepper
    • Link to intermediate subreddits
    • Map Presentation
    • Social Integration & Sharing artifacts
  • Core Improvements
    • General Feedback, Animations, & Art Polish
    • Graph Criteria Expansion
    • Better NSFW classification
    • Telemetry + Aggregate Insights
    • The Hop Shop (Customization)

Built With

Share this project:

Updates