Skip to content

The game servers

Every time you're hunting a Kacky map, you're connected to a Trackmania 2020 dedicated server — the same kind anyone can run, just loaded with the Kacky map pool and a lot of custom logic bolted on. A dedicated server on its own is dumb: it runs the maps and reports raw events. It doesn't know what a "finish count" is, or how to draw the in-game record list. That's a second program's job.

kontrol: the controller next to each server

Next to every Trackmania server runs a controller called kontrol. One kontrol per server, paired up. kontrol is the in-game brain: it talks to the game server over a local protocol (XML-RPC), renders the in-game UI you see — the record widgets, the /records list — and reports what happens back to the Kacky backend.

kontrol is a fork of an open-source controller (MiniControl) with the Kacky-specific features layered on top. It's written in TypeScript. When you cross the line, kontrol turns the server's raw event into a clean "player finished" message and publishes it over Redis Streams to the backend. You can follow that whole finish journey end to end, or see the architecture overview for where it fits.

Where all this physically runs

None of it runs on some player's PC. Everything lives on Hetzner Cloud — a hosting provider — as rented virtual servers (VPS).

  • Game hosts run the Trackmania server and its kontrol side by side, as a pair of Docker containers sharing a local network. The permanent hunting servers and the event servers each get their own host.
  • A separate utility host runs Redis, the pipe kontrol uses to reach the backend.
  • The app host runs the backend and the websites.

The whole fleet is set up and updated with Ansible (infrastructure-as-code — the servers are described in files, not clicked together by hand). Container images are built in CI and pulled from a registry. Admins can trigger a deploy from the admin panel. When kontrol updates, it reloads on its own without kicking players — you stay connected mid-hunt.

Kacky also runs some older Trackmania Nations Forever servers, but those don't have kontrol next to them yet.