Inspiration
I wanted to build something fun that could also teach people a little along the way. I've always enjoyed daily guessing games, especially the kind where every attempt gives you a new clue and makes you want to try one more time.
Geography felt like a natural fit. Instead of simply asking players to name a country, I wanted them to figure it out using clues about distance, direction, and geography.
I liked the idea of turning something educational into a daily challenge that people could enjoy. That's how CountryQuest started.
What it does
CountryQuest is a daily geography guessing game that runs directly inside a Reddit post. The goal is to find the mystery country in six attempts.
Players can search through 195 countries and submit their guesses. After each incorrect guess, the game provides three clues:
- Distance: How far the guessed country's capital is from the mystery country's capital.
- Direction: A directional needle showing which way to look.
- Closeness: A label ranging from "Very far" to "Very close".
Each incorrect guess also unlocks another hint. The hints gradually narrow things down, starting with the continent and eventually revealing the number of letters in the country's name.
Everyone gets the same mystery country each day, making it possible to compare results with other players.
The game also includes player statistics such as games played, win rate, streaks, and guess distribution. Once a game is finished, a result card reveals the country along with some facts. Players can share their results using spoiler-free text that links back to the Reddit post.
How I built it
I built CountryQuest using React, JavaScript, and CSS on Reddit's Devvit Web platform. I used Express for the backend and Redis for storage.
I separated the game logic from the user interface. The React frontend handles the game screen, country search, hints, and player interactions, while the Express server handles the API requests and game rules.
I also created a dataset of 195 countries containing alternative names, capital coordinates, hints, and country facts. The game uses the capital coordinates to calculate the distance and direction between a player's guess and the mystery country.
Keeping the answer secret was particularly important. The answer, coordinates, hints, and facts stay on the server, while the client only receives the information it needs. Player attempts are saved in Redis for each player and UTC day, so refreshing the page doesn't reset their progress.
I also wrote automated tests for the game engine and server logic. For the visual side, I focused on a clean, mobile-friendly interface with bundled fonts, custom background artwork, and layouts that work on both phones and larger screens.
Challenges I ran into
I built this project on my own, so there were quite a few things I had to figure out along the way.
- Turning geography into useful clues: Calculating the distance and direction between two capitals was one challenge. Making those results easy for players to understand and use was another.
- Keeping the answer secret: I needed to make sure the correct answer and other hidden data stayed on the server without making the game feel slow or complicated.
- Making daily play fair: Everyone needed to receive the same puzzle, but each player's progress had to remain separate. I also had to handle refreshing, duplicate guesses, double taps, and the transition to a new daily puzzle without giving players extra attempts.
- Getting the country data right: While testing, I found several small data issues, including incomplete currency information, incorrect letter counts for names with hyphens, and some border-count mistakes. I corrected them and added tests to help prevent those issues from returning.
- Getting the demo community approved: Near the end, Reddit's automated systems banned my first demo community under Rule 2, even though it only contained my game. I appealed and set up a new community with the same app, so the game is still playable. It taught me to plan for platform checks on new communities, and to keep my submission links up to date. Getting all these parts to work together took a lot of testing, debugging, and small improvements.
Accomplishments I'm proud of
I'm proud that I managed to turn a simple idea into a working game that people can play directly on Reddit.
CountryQuest now includes 195 countries, daily puzzles, distance and direction clues, progressive hints, player statistics, and spoiler-free result sharing.
I'm particularly happy with the server-side answer protection and the way player progress survives page refreshes. I also put a lot of effort into making the interface comfortable to use on mobile devices.
What I learned
Building CountryQuest gave me practical experience with Reddit's Devvit Web platform and full-stack development.
I became more comfortable working with React, Express, and Redis, and learned more about connecting a frontend to a backend, managing persistent player data, and building a daily puzzle system.
I also learned more about geographical calculations and why server-side logic is important when building a game where the answer needs to remain hidden.
One lesson that stood out was the importance of testing the data itself, not just the code. Small mistakes in country information can affect the entire gameplay experience, so checking those details matters just as much as testing the game mechanics.
What's next for CountryQuest
CountryQuest is working, but I don't consider it finished.
I'd like to improve it based on player feedback and see which parts of the game people enjoy most. I also want to explore better ways to compare results with friends, expand the statistics, and make the daily challenge even more engaging.
For now, my main goal is to get more people playing, listen to their feedback, and use that feedback to decide what to build next.
Built With
- css
- express.js
- javascript
- react
- reddit-devvit-web
- redis