How Kacky reads maps¶
Every Kacky map is a Trackmania 2020 map file, a Gbx file (Trackmania's own format for maps, and for replays too). A map file is not just track pieces. Baked inside it is a pile of information that Kacky reads straight out of the file, so nobody has to type it in.
What comes out of the file¶
When a map lands, Kacky pulls out:
- The map's name and the author who built it.
- The author time, the map maker's own reference time on the map.
- A thumbnail, the little preview picture, which is embedded right there in the file.
- The map's unique ID, the one dependable way to tell two maps apart.
Cracking open a Gbx file is done with GBX.NET, the open-source library that knows the format inside out.
The map number is a Kacky invention¶
One thing Kacky works out rather than reads: the map number. Trackmania has no "map number" field. It is a Kacky naming convention. Mappers put the number in the map's name, like "Kacky Reloaded 123", and Kacky reads it back out of the name. Trackmania lets you drop colour codes into a name, so those get stripped off first, and a stray code never gets mistaken for the number.
The backend is always the authority¶
When a mapper uploads a map, a quick preview can be read right in their browser. The real, trusted values come from the backend reading the file itself. They never come from the browser guess or the filename.