Micro Machines Brake Point Format
Brake points for Micro Machines are stored in GAME1\ROUNDnmB.BRK files, one per race. They tell the computer controlled cars where to slow down for corners and where to speed up again. Round 9 (Ruff Trux) has no brake files, as it has no computer opponents.
File format
The file is a list of bytes with no header, 29 to 183 bytes long. It is indexed by the track progress value of the cell a car is on (plane 2 of the .MAP file): byte p applies to all cells with progress p. So a file needs one byte more than the highest progress value of its track.
The game loads the file into a 512-byte buffer that is never cleared. Round 3 has cells with progress 255, past the end of its files; the game then reads whatever is left in the buffer.
Each byte is a record:
| Bits | Purpose |
|---|---|
| 0-3 | Speed value s (0-15) |
| 4-7 | Record type |
Record types
| Type | Meaning |
|---|---|
| 0 | No limit. The car keeps accelerating. |
| 1 | Speed limit: brake if the current speed is above 896 + 128 × s, otherwise accelerate. |
| 2 | Minimum pace: raise the car's target speed to at least 1536 + 64 × s. Never brakes. |
| 3, 4, 15 | Corner check: act like type 1 while the car is still turning towards the AI direction, otherwise like type 0. |
Types 5-14 are not used in the shipped files and behave like 3, 4 and 15.
The type 1 limit is adjusted by the game: +80 for the 23rd race of the tournament, and for tanks -208 (and a further -32 from the 19th race on).
The shipped files use type 0 (957 times), 1 (1313), 2 (21), 3 (3), 4 (283) and 15 (23).
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!)