Raynegard game assets: Difference between revisions

From Raynegard Wiki
Jump to navigationJump to search
No edit summary
Add overview of the BIN and SSF asset container formats (via update-page on MediaWiki MCP Server)
Line 1: Line 1:
<strong>Game files.</strong>
Raynegard's game data is distributed as many small files packed into a handful of custom container/archive formats. The client unpacks these at startup (or on demand) to load its text, images, sprites, maps, NPC/item data, and sound.
*[[BIN files]]
 
*[[SSF files]]
The two container families documented so far:
 
*[[BIN files]] — the game's general-purpose archive format. Assets of a given category (text, sprites, maps, NPC data, etc.) are bundled in matched pairs of files: a small header file (e.g. <code>textdatah.bin</code>) and the packed data file (<code>textdata.bin</code>). The header is just a flat list of <code>(offset, size)</code> entries, one per packed file, with no padding or alignment between entries. Some archives ("directory-type") also store a self-referential file-name list as entry 0, so files can be looked up by name instead of index; others are accessed purely by numeric index. Contents are sometimes obfuscated with a simple repeating XOR cipher (key byte + increment, resetting per file) rather than real encryption. At startup the client loads about a dozen of these paired archives — <code>bitmapdata</code>, <code>cockpitdata</code>, <code>etcimage</code>, <code>mapdata</code>, <code>npcdata</code>, <code>palette</code>, <code>pattern</code>, <code>point</code>, <code>sedata</code>, <code>seqence</code>, <code>sprite</code>, <code>textdata</code>, <code>texture</code> — together covering nearly every non-executable asset category in the game.
*[[SSF files]] — Raynegard's custom compressed audio format, used for the game's sound effects and music. Each <code>.ssf</code> file has a small header (channel count, sample rate, loop flag/loop point) followed by audio data encoded with a custom ADPCM-style compression scheme. Decoding walks the file block by block, reconstructing 16-bit PCM samples from packed nibbles and a small set of fixed prediction coefficients, so it can be converted losslessly-in-practice to a standard <code>.wav</code> for playback outside the game.
 
Overviews of the individual file types packed inside each container (or, for SSF, further format detail) will be added on their respective pages next.

Revision as of 12:49, 2 July 2026

Raynegard's game data is distributed as many small files packed into a handful of custom container/archive formats. The client unpacks these at startup (or on demand) to load its text, images, sprites, maps, NPC/item data, and sound.

The two container families documented so far:

  • BIN files — the game's general-purpose archive format. Assets of a given category (text, sprites, maps, NPC data, etc.) are bundled in matched pairs of files: a small header file (e.g. textdatah.bin) and the packed data file (textdata.bin). The header is just a flat list of (offset, size) entries, one per packed file, with no padding or alignment between entries. Some archives ("directory-type") also store a self-referential file-name list as entry 0, so files can be looked up by name instead of index; others are accessed purely by numeric index. Contents are sometimes obfuscated with a simple repeating XOR cipher (key byte + increment, resetting per file) rather than real encryption. At startup the client loads about a dozen of these paired archives — bitmapdata, cockpitdata, etcimage, mapdata, npcdata, palette, pattern, point, sedata, seqence, sprite, textdata, texture — together covering nearly every non-executable asset category in the game.
  • SSF files — Raynegard's custom compressed audio format, used for the game's sound effects and music. Each .ssf file has a small header (channel count, sample rate, loop flag/loop point) followed by audio data encoded with a custom ADPCM-style compression scheme. Decoding walks the file block by block, reconstructing 16-bit PCM samples from packed nibbles and a small set of fixed prediction coefficients, so it can be converted losslessly-in-practice to a standard .wav for playback outside the game.

Overviews of the individual file types packed inside each container (or, for SSF, further format detail) will be added on their respective pages next.