Country Quizzer
The Country Quizzer is a educational game designed to help users learn the countries of the world in a simple and minimalistic way. Click the button below to play the game:
Play GameThe Country Quizzer has been ported to three different engines. The first version was created in Unity 5 in 2015. Once Unity switched to a subscription model I ported the game in 2017 to Godot. This engine was open source and gave me the freedom and flexibility I wanted for the project. In 2024 I ported the game to the web with BabylonJS for native browser support and experimentation. The browser version allows me to share the game more easily as it doesn't require anyone to install anything. Over the years, as I ported the game across these different engines, I have improved upon it and found better ways to approach some of the challenges.
In the Country Quizzer you select a continent, and then you are asked to identify countries at random within that continent. Players are given a list of options, with the correct answer shuffled among them. Choosing the correct country highlights the country with the correct color, while incorrect answers highlight the country in red and reveal correct the name. After goin through all the countries in a continent, it reveals your total score and what percentage you were correct on. The objective is to familiarize players with the geography of every country across the globe.
The biggest challenge in this project was figuring out how to efficently show the countries and be able to highlight and control all the colors of each country individually. It was also important for me to show the countries on a 3D globe, as the globe has the most accurate representation of each countries true size and location.
In the first version, I solved this problem by creating a mesh for each individual country.
An SVG file is imported into Blender and transformed into a sphere using custom scripts. First, the mesh is sliced into a grid to ensure it has enough detail to properly form a sphere. Once the grid is created, the vertices are transformed to match the curvature of a sphere, accurately representing the 3D world.
The game works by parsing the 3D model, which is organized by continent and country within Blender. This organization allows the system to retrieve continent-country pairs efficiently. The camera's target location is set to the center of the specific country’s mesh, ensuring precise focus on each country during gameplay.
Camera animations are controlled using nested empty transforms, which drive both the rotation and offset for smooth transitions.
In the latest version, I no longer control the countries color with individual meshes, but now enterely via a shader. Each country is its own index on the R channel, and its state is driven by a texture where each pixel corresponds to each countries index.
This new method allowed me to add clean country borders as well as I could sample neighboring pixels and detect borders when the R channel was different.
A score tracker was added which shows the total amount of questions that were answered correctly and incorrectly. Also notifying the user which question they were on and how many there were in total.