Deathtrack High Score Format

From ModdingWiki
Jump to navigation Jump to search
Deathtrack High Score Format
Format typeConfiguration
StoringScores
Games

HI_SCORE stores the ten best players' names and winnings. It is one of the two files the game writes. The file is not compressed and has no header; the game refuses to dispatch to any screen if it is missing, so a copy must always be supplied.

File format

The file is exactly 190 bytes: ten records of 19 bytes in file order.

Data type Name Description
char[15] name Player name, NUL-terminated within the field. Bytes after the NUL are leftovers of earlier names
UINT32LE winnings Money won, compared as an unsigned number

The game's built-in defaults are ten entries named NEW KID (padded with spaces) with winnings 0.

Notes

  • The table is not sorted. When a new score is added, the game looks for the lowest winnings (scanning from slot 9 down to slot 0, using a strict "less than", so ties go to the highest index) and replaces that slot if it is lower than the new score.
  • The name written is the 14-byte player name that is also saved in saved games.
  • The game reads the file with open(path, O_RDONLY|O_BINARY) and writes it with O_WRONLY|O_CREAT|O_TRUNC|O_BINARY. Read results are not checked.

Source code

From re-deathtrack, the open-source browser port:

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!)