Articles

Articles

The technical behind-the-scenes of stationdoku: how the game is built, and why.

Real time

Playing a grid with others, shared or live

A grid can be played with others in two ways: on a single phone and then shared, or each on their own phone, live. Here is what each one records, how the points are split, how a move reaches the others, and what happens when someone leaves.

Data

Toulouse in open data: where the criteria come from

Two VAL lines, one tram line, 60 stations and the Garonne in the middle. Here are the public sources behind Toulouse, the code that computes the bank of each station, and what I chose not to use.

Data

Paris in open data: where the criteria come from

321 metro stations, 139 criteria, and about fifteen sources behind them: Île-de-France Mobilités, Paris Data, Wikidata, INSEE, property sales, election results… Here is how I combined them, with the code, and what I had to estimate.

Data

Lyon in open data: where the criteria come from

Four metro lines, seven tram lines, 144 stations, two rivers. Here are the public sources used to build Lyon, and the code that orders stations without timetables, reconciles abbreviated names with those on Wikipedia, and measures the distance to the riverbanks.

Data

Lille in open data: where the criteria come from

Two VAL lines, 60 stations, and not a single hand-entered row. Here are the five public sources used to build the Lille metro, the code that stitches them together, and why some Paris criteria don't exist there.

Real time

Real time in Rust, with Redis as the bus

Seeing your friends play at the same time as you, playing a grid together on different phones: behind it, a small Rust server that knows almost nothing, and Redis connecting everyone.

Grid

Why the same criterion no longer comes back the next day

The grid generator had no memory: a criterion could come back two days in a row, and the families rich in values, like lines or arrondissements, took half of the draws. Here is what I measured and the two rules that spread the criteria better.

Architecture

One server, fourteen containers

The whole game runs on a single machine in Paris, with no Kubernetes and no managed service. Here is what's on it, how a new version gets there without downtime, and how I see what's going on.

Architecture

Django and FastAPI in a single application

The game's pages and API are served by FastAPI, the database and the admin by Django. Both run in the same process, behind a single ASGI application: here is how they share the work, and everything that had to be redone by hand.

Real time

Two players, one cell

In a team, two teammates sometimes tap the same cell in the same second. Only one answer can win. Here is how PostgreSQL lines the two moves up one behind the other, why the second costs nothing, how the other player's page notices, and what happens when you play solo on two tabs.

Score

What an error, a hint and a restart cost

Three actions take points off a game, and nothing else does: not time, not giving up. Here is how they are counted, why an error at 0 points is not free, and why it can be free at 900.

Grid

How I measure the difficulty of a grid

Every grid has a level from 1 to 5. It does not come from how famous the stations are, but from the number of answers in each cell, weighted by how much it is possible to know about its two criteria.

Score

How I compute the rarity of an answer

Mythical, very rare, common… Every right answer gets a tier and points according to the chance that a player thinks of that station. At first I estimate it, then the players correct the estimate.