Inspiration

This game was inspired by playing a lot of Worldle but getting frustrated when the name of a country slipped my mind. I wanted a game where you can get the answer without having every country name memorized.

What it does

TerraTherma is a daily geography game built around deduction. Deduce the mystery country based on the hot-and-cold feedback to refine your next guess. There's new set of countries every day!

How I built it

I started by building the basics of user input of guesses from a list of countries. Then I used python to generate the required dataset for calculating the hot/cold values for every pair of countries using a python library (countryinfo). Extra work had to be put into getting the scaling for the population to feel right. I used a logarithmic scale where each order of magnitude represents about 10% of the bar so that there is meaningful feedback for the wide array of populations. Then I integrated the map from a Wikipedia SVG and a JS pan and zoom library. After that I worked on styling the map based on user clicks and previous guesses. I had to find a map that had a common country code with my dataset. This project existed before but required a significant overhaul and additions for this hackathon. I moved a good deal of logic server-side, I integrated Redis for storing user game state and stats (before it was just localstorage), I overhauled the interface and added animations, I added a leaderboard and stats screen.

Challenges I ran into

Finding an SVG world map that had all of the countries as separate interactable elements and matched my data source was difficult. I had to learn Redis for this, which turned out to be fairly easy to integrate, but challenging to sync with the existing use of localStorage. Initially I used a bunch of API calls to initialize my game which ended up being pretty slow for first time users, I had to refactor a lot of things to minimize the API calls to reduce the latency. Lastly, designing layouts for the wide array of screen sizes is a huge challenge!

Accomplishments that I'm proud of

I'm proud that I made a geography game that appeals to a wide array of users while still having a high skill-ceiling. Getting the loading time down took a lot of work but it feels fast now.

What's next for TerraTherma

I want to continue to improve it based on user feedback. Bringing in a 3D globe would be fun. Additional stats for users that play each day.

Share this project:

Updates