Micro Machines Tile Properties Format
Tile properties for Micro Machines are stored in GAME1\ROUNDnBR.LEV files, one per round. They define how a car is placed back on the track after it has fallen off, and which meta-tiles are unsafe to respawn on.
File format
The file holds one byte per meta-tile, in the same order as the .CT file, with no header. It is 49 to 64 bytes long. (Round 2's file has 3 bytes more than the round has meta-tiles. They are never used.)
The game always reads 128 bytes into a fixed buffer, and does not check how many were actually read.
| Bits | Purpose |
|---|---|
| 0-1 | Set on some tiles, but not used by the game |
| 2-4 | Respawn nudge (0-7), see below |
| 5-6 | Respawn heading (0-3), see below. Also selects the direction remap table of the .DIR flow field. |
| 7 | Unsafe tile: while a car is on this tile, its position is not remembered as a respawn point |
Respawning
While a car drives, the game keeps remembering its position as the point to put it back to if it falls off the track, except on tiles with bit 7 set.
When a car respawns, the remembered point is snapped to the centre of its 96×96 cell and moved by the nudge vector from bits 2-4:
| Value | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| x | 0 | 36 | -36 | -36 | 36 | -36 | 36 | 0 |
| y | 0 | -36 | 36 | 0 | 36 | -36 | 0 | -36 |
The car then faces the heading chosen by bits 5-6:
| Value | Heading |
|---|---|
| 0 | 0x40 (right) |
| 1 | 0x80 (down) |
| 2 | 0x60 (down-right) |
| 3 | 0xA0 (down-left) |
This heading is turned around by 180° once for each .MAP attribute bit set on the cell.
Credits
This file format was reverse engineered by VorticonCmdr. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)