-
-
Flag It runs natively on Reddit. Each day, a new interactive post invites players to test their flag knowledge together
-
A clear, colorful welcome screen explains the daily challenge and lets players start playing in one tap
-
Players guess the country behind a flag or decide if it doesn’t exist, with a clean, focused interface
-
Each guess gives continent and distance feedback, turning trial and error into strategic deduction
-
After three wrong guesses, the game reveals yesterday’s answer, lets you share your result, and invites you back tomorrow for today's answer
-
When you win, a celebratory screen shows the answer is correct, together with yesterday's correct answer. You can also share your result
-
Players can submit real or fictional flags, helping grow the daily challenge through community content
-
Simple settings let players toggle sound effects and ambient music for a personalized experience
-
A history view shows past daily results and attempts, reinforcing progress and long-term engagement
Inspiration
Flag It was born at the intersection of three loves: geography, Wordle-style daily challenges, and the Reddit community's penchant for "spotting the fraud." While many geography games exist, I noticed they often feel static. I wanted to create something that wasn't just a test of memory, but a test of intuition. The primary inspiration was the "Fake Flag" concept—introducing a "troll" element that keeps even geography experts on their toes.
What it does
Flag It is a daily geography puzzle integrated natively into Reddit.
- Daily Mystery: Every 24 hours, a new flag is featured.
- The Twist: Not every flag is real. Players must decide if they are looking at a sovereign nation's flag or a clever "fake."
- Hot/Cold Feedback: If the flag is real, every guess provides geospatial feedback, showing you how many kilometers you are from the target and whether you've hit the correct continent.
- Community Submissions: Players can submit their own flags (real or fake) to be reviewed and included in future daily rotations, making it a community-curated game.
How I built it
I leveraged the Devvit (Reddit Developer Platform) to create a high-performance WebView experience.
- Frontend: Built with React 19 and Vite, using Tailwind CSS 4 for a "Premium" design system featuring glassmorphism and smooth, hardware-accelerated animations.
- Backend: An Express 5 server running within the Devvit environment, managing game logic and security.
- Persistence: I used Redis to store community submissions and track daily flag rotations.
- Geospatial Logic: To calculate distances between guesses, I implemented the Haversine formula. This mathematical model helps determine the great-circle distance between two points on a sphere:
$$ 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$ is the Earth's radius (6,371 km), $\phi$ is latitude, and $\lambda$ is longitude.
Challenges I ran into
- The CSP Wall: Fetching flag assets from external APIs while adhering to Reddit's strict Content Security Policy (CSP) was tricky. I solved this by building a custom Server-Side Image Proxy that fetches, validates, and serves images securely.
- Asset Weight: I wanted a high-polish look with video backgrounds and sound effects without sacrificing load times. I optimized this by using progressive loading and a centralized SoundManager.
- Mobile Fidelity: Ensuring the "premium" glassmorphic UI looked as good on a mobile app as it did on a desktop required careful CSS tuning and responsive layout refactoring.
Accomplishments that I'm proud of
- Unique Mechanic: Successfully implementing the "Fake Flag" logic that changes how players approach geography trivia.
- Polished UX: Creating an interface that feels like a native, premium app rather than a simple web snippet.
- Recursive Loop: Building the "Submit a Nation" feature which ensures the game can grow infinitely through community participation.
What I learned
Building on Devvit taught me how to bridge the gap between traditional web development and a closed social ecosystem. I learned the nuances of WebView-to-Server communication and the importance of designing "social-first" features, like the result-sharing system that posts comments directly to Reddit.
What's next for Flag It
- Global Leaderboards: Using Redis to track fastest guesses across the entire subreddit.
- Multiplayer "Race" Mode: A real-time mode where players compete to identify a series of flags first.
- Enhanced Fakes: Using AI-generated variations of real flags to make the "Fake Flag" challenge even more devious.
Built With
- css3
- flagcdn
- geospatial-logic
- html5
- image-proxying
- react
- reddit-developer-platform
- redis-api
- tailwind
- typescript
- vite
- webview
- webview-integration

Log in or sign up for Devpost to join the conversation.