For the complete documentation index, see llms.txt. This page is also available as Markdown.

GEM RTS Binary File Formats

Most of the binary files in GEM RTS are chunk-based containers.

Each chunk begins with a four-byte magic identifier (FourCC), usually a human-readable combination of four ascii chars, and followed by a data block of variable or zero length.

All multi-byte values in GEM RTS binary formats are stored in Little-endian format, where the least significant byte is stored first.

Binary containers

File name
Description

.mesh

Container file that stores one or more mesh resources in .ply format.

.cmesh

Container file that stores one or more collision and physics mesh resources in .vol format.

.animation

Container file that stores one or more animation resources in .anm format.

Binary files (legacy)

Extension
Description

.ply

Mesh resource. In GEM RTS it is stored inside a .mesh container.

.anm

Animation resource.

In GEM RTS it is stored inside an .animation container.

.vol

Collision and physics mesh resource.

In GEM RTS it is stored inside a .cmesh container.

Data types

Type
Description
Size

FourCC

Chunk ID. Quadruple byte magic identifier, four ASCII symbols.

4

int8 / uint8

Single byte signed / unsigned integer.

1

int16 / uint16

Double byte signed / unsigned integer.

2

int32 / uint32

Quadruple byte signed / unsigned integer.

4

float

Quadruple byte floating point number.

4

string8

Short string:

  • uint8 length

  • uint8[length] symbols, no null terminator.

1+

string8/24 or string24

Smart long string. For short strings, where length is less than 255, the structure is the same as string8. If length is greater than or equal to 255:

  • uint8 signature 0xFF

  • uint24 long_length

  • uint8[long_length] symbols, no null terminator.

1+

string32

Legacy format:

  • uint32 long_length

  • uint8[long_length] symbols, no null terminator.

4+

Other conventions

Convention

Description

struct

Nested data structure.

<type>[<number>]

Fixed-size array of type <type> containing <number> elements.

<type>[<name>]

Variable-size array of type <type>. The number of elements is specified by the value stored in field <name>.

unorm8

Representation of fractional floating-point values in the range [0..1] using an 8-bit unsigned integer (uint8) in the range [0..255].

Little-endian

Byte order convention used for multi-byte integer values. The least significant byte is stored first.

Last updated