Skip to content
Alejandro ArandaAlejandro Aranda
Back to projects
3 min readjavascriptreact

Flags Quiz

Alongside the map puzzles at mappuzzle.xyz there is a Flags Quiz. A flag waves at you and you have to say whose it is, choosing from six names, with the map right there to show you where it belongs.

Flags Quiz in action: an animated flag, the answer options and the interactive map
The Flags Quiz in action

Not the flags you already know

Most flag quizzes are quizzes about countries, and after the second round you are naming Japan and Brazil again. This one goes down a level: of the 49 sets, most are made of provincial and regional flags — Spanish provinces, Swiss cantons, Japanese prefectures, Croatian counties. There are 1,718 flags in there, and a good part of them are ones you would struggle to place even if you live in the country they belong to.

That is the whole point of it, really. Vexillology stops being a memory test the moment the flags stop being famous, and starts being a way to notice what a place says about itself: how much heraldry survives in the flags of a Spanish province, how quiet the Swiss cantons are, how often a crown or a river turns up.

The 52 provincial flags of Spain laid out in a grid beside the map
The Spanish provinces map: fifty-two pieces, fifty-two flags

How it is built

The quiz is not a separate game so much as a different question asked of the same material. It sits on top of the map puzzle platform and reuses its React components, its maps and its database, which is why it took a fraction of the time the puzzles did.

The flag itself waves in 3D, drawn with react-three-fiber — Three.js as React components. I will admit the first version of that flag came out of a conversation with ChatGPT; what it gave me was a starting point, and the version that ships has been reworked enough that little of the original survives. It seemed worth saying, since the alternative is pretending otherwise.

The flags themselves are the slow part, and they come from Wikimedia: the editor looks up each region's article, finds its flag, and stores it at several sizes. Regions whose flag it cannot find are simply left out of the quiz, which is why some maps have one and others do not.

Where it stands

Forty-nine sets, from the borders of the world down to the municipalities of Seville. Like the rest of mappuzzle.xyz it is free, asks for no account and keeps nothing about whoever plays; each quiz has an address of its own, in seven languages.

Start here, with the flags of the world: mappuzzle.xyz/flag-quiz/world-borders/ — or pick a country's provinces and find out how little you know about the place next door.

Support the project

The quiz lives inside mappuzzle.xyz and plays by its rules: free, no accounts, nothing stored about whoever plays. If it hooks you, you can support it through GitHub Sponsors; every new batch of flags comes out of whatever time there is to give it.

You may also like