Major Stryker Level Format
Format type | Map/level |
---|---|
Map type | 2D tile-based |
Layer count | 1 |
Tile size (pixels) | 16×16 |
Viewport (pixels) | 256×160 |
Games |
File Format
The basic layout of a level file is as follows:
Data type | Description |
---|---|
Char[12] cMaskTiles | filename of the masked tile graphics |
Char[12] cSolidTiles | filename of the solid tile graphics |
Char[12] cBackdrop | filename of the backdrop tile graphics |
Char[12] cUnused1 | unused filename (always "dropa.dr1") |
Char[12] cUnused2 | unused filename (always "attr00.dr1") |
Char[12] cMusic | filename of the music file |
Char[12] cUnused3 | unused filename (always "mboss.dr1") |
UINT16LE iFlags | Flags for lights etc (see below) |
UINT16LE iWidth | Width of map, in tiles (always 32) |
UINT16LE iActorSize | Number of UINT16LE values in the actor data |
UINT16LE[iActorSize] iActorData | Actor entries (3 values per actor, see below) |
BYTE[240] bMaskAttributes | Tile attributes (one byte per tile, see below) |
BYTE[240] bTileAttributes | Tile attributes (one byte per tile, see below) |
UINT16LE[16767] iTileData | Tile codes for the entire level |
The bits in the iFlags value have the following meaning:
Bit mask | Effect |
---|---|
0x0001 | none (this is ALWAYS set but has no effects at all) |
0x0002 | lightning (only used in E2M1) |
0x0004 | scroll bottom plane faster (for bosses in E1M12, E2M12, E3M12) |
The tile attribute bits have the following effects:
Bit mask | Effect |
---|---|
0x10 | road |
0x20 | animated) |
0x40 | shootable |
0x80 | blocking (any direction) |
Actor entries use the following data structure:
Data type | Description |
---|---|
UINT16LE iType | ID number of this actor |
UINT16LE iPosX | X coordinate of this actor, in tile units |
UINT16LE iPosY | Y coordinate of this actor, in tile units |
The game ignores the iWidth value read from the file and sets it back to 32, thus the level's height will always be 523, leaving 31 UINT16LE values unused at the end of the tile data.
Tile Data
The range of valid tile data goes from 0 to 0x1ED0. Some levels also contain the invalid values 0x22C0 and 0x22E0 in the 31 unused tiles at the end, which must be handled separately.
- Values smaller than $F0 are tile indices for the masked tileset.
- Subtract $F0 from any other valid value to get an offset into the solid tileset in memory (divide the offset by 32 to get a tile index).
The map layout is special because the game uses parallax scrolling. The first 16 tiles of each row make up the actual map, the last 16 tiles of each row make up the layer that scrolls below the actual map (at half the speed). Actors can be placed in both of these "layers".
Credits
This file format was reverse engineered by K1n9_Duk3. 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!)