Track file
General infos
One of the most interesting features of Stunts is the possibility to create your own tracks, whatever the editor you choose to do so.
Each track is composed of 30x30 squares, one byte for each square. That is 900 bytes for track layout, with 1 additionnal byte for horizon. Terrain information (fills, water) is recorded the same way, that is 900 bytes for terrain information too. Last byte is a padding zero. Therefore, any track file (extension .TRK) should be 1,802 bytes long.
Track layout starts at offset 0x0000. Horizon is at offset 0x0384. Terrain information starts at offset 0x0385 and the zero byte is at offset 0x0709. Information is recorded row by row : left to right, bottom to top for the track layout block but left to right and top to bottom for the terrain block.
Terrain codification
Adapted from Jonas Baehr's page [2]
Key to the table columns:
- Element: Terrain element name.
- Orientation reference: for elements with multiple possible orientations, the feature of the element to which the orientation columns refer to.
- Orientation: Orientation of the reference feature. "Any" indicates there is just one orientation. The other columns refer to map sides as cardinal points (N, S, W, E = top, bottom, left, right). The ">" sign indicates direction, so S>N means vertical orientation, bottom to top. Compass points indicate the corners of a tile or element (NW, SW, SE, NE = top left, bottom left, bottom right, top right).
To find the hexadecimal value for a certain element, find its entry under the row of the element name and the column of the desired orientation.
Element | Orientation reference |
Orientation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Any | NW | SW | SE | NE | S>N | E>W | N>S | W>E | ||
Flat ground | 00 | |||||||||
Water | 01 | |||||||||
Diagonal coast | Corner inside water | 05 | 02 | 03 | 04 | |||||
Flat hill | 06 | |||||||||
Hill slope (straight) | Uphill direction | 07 | 08 | 09 | 0A | |||||
Angled slope (outer edge) | Heightened corner | 0B | 0C | 0D | 0E | |||||
Angled slope (inner edge) | Lowered corner | 11 | 12 | 0F | 10 |
Track codification
(to be completed - for the moment, see the external links [2])
Horizon codification
- 0x00 Desert
- 0x01 Tropical
- 0x02 Alpine
- 0x03 City
- 0x04 Country
- 0x05 Chaotic scenery (can make the game react weird sometimes)