Spot the Nation

Inspiration

Spot the Nation was born from a fascination with our world's diverse architecture, flora, and streetscapes. While "Geo-guessing" is a popular genre, traditional versions often lacked a narrative hook.

The goal was to transform geography enthusiasts into "intelligence officers". The game should feel less like a classroom quiz and more like a high-stakes reconnaissance mission, where every minor detail—the curve of a roof, the color of a license plate, or the species of a tree—becomes vital intel.

What it does

Spot the Nation is an immersive daily challenge platform built natively into Reddit.

  • The Recon Mission
    Players face a "Triple Threat" challenge that changes every 24 hours, consisting of three difficulty levels:
    EasyMediumHard

  • Progressive "Intel" Reveal
    The core mechanic: Each level has one photo of a mistery country, that users have to find in no more than 6 guesses.

  • Distance Feedback
    Using real-world geospatial data, players receive precise feedback:
    "You are X kilometers from the target nation" after every attempt.

  • Community Intelligence
    A dedicated submission system lets the community propose new mystery nations → ensuring the game's intelligence database is constantly evolving and user-curated.

  • Atmospheric Immersion
    Integrated audio profiles (Cinematic Noir, Nu-jazz, etc.) create a professional "investigative" tone.

How I built it

I used Devvit (Reddit Developer Platform) to create a high-performance, premium WebView experience.

  • The Stack

    • Frontend: React 19 + Vite
    • Styling: Tailwind CSS 4 with a high-polish Glassmorphism interface
  • Type-Safe Communication
    tRPC + Hono for seamless, end-to-end type-safe communication between the React client and Devvit server.

  • Global Presence
    Redis handles persistence: daily rotations for the entire subreddit + user-submitted locations.

  • Geospatial Logic
    Accurate distance feedback is powered by the Haversine formula:

$$ a = \sin^2\left(\frac{\Delta\phi}{2}\right) + \cos\phi_1 \cdot \cos\phi_2 \cdot \sin^2\left(\frac{\Delta\lambda}{2}\right) $$

$$ c = 2 \cdot \operatorname{atan2}(\sqrt{a}, \sqrt{1-a}) $$

$$ d = R \cdot c $$

where $R$ = Earth's radius (6,371 km), $\phi$ = latitude, $\lambda$ = longitude.

Challenges I ran into

  • The "Intel" Logic
    Designing a performant and visually satisfying progressive uncrop was complex — needed to feel like natural information expansion without breaking UI layout across device screen sizes.

  • State Synchronization
    Managing three distinct game states (Easy/Medium/Hard) in a single daily session while preventing data loss during page refreshes or Reddit app transitions.

  • Content Policy & Security
    Handling user-submitted images while strictly adhering to Reddit's Content Security Policy (CSP) → required building a secure proxy layer to validate and serve assets safely.

Accomplishments that I'm proud of

  • Successfully created an immersive narrative — moving away from trivia to a modern reconnaissance experience
  • Built a unified visual identity that feels like a native, premium Reddit application (smooth hardware-accelerated transitions)
  • Created an infinite loop via the "Submit a Nation" system — community provides the content they want to play

What I learned

Building on the Reddit Developer Platform taught me the importance of "Social-First" design: bridging complex web logic (e.g. coordinate distance calculation) with social features like one-click sharing that posts results as native Reddit comments.

What's next for Spot the Nation

  • Global Intelligence Briefing
    Reddit-wide leaderboard showing which "Intelligence Officers" have the best global reach

  • Street-Level Intel
    Evolving from static images to interactive 360-degree street-view reconnaissance

  • Competitive Recon
    Real-time multiplayer modes — players race to identify a nation with the fewest "Intel Reveals"

Built With

Share this project:

Updates