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 (see below) |
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 animation
Animated tiles display as a loop of 4 different images, consisting of the tile in question plus the 3 tiles following it in the tileset. For example, let's say that tile index 50 has its animated flag set in the attributes array. At locations where that tile is placed, the game actually displays a sequence of indices 50, 51, 52, 53, repeated.
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" (see below).
Actor IDs
Some actors spawn objects into the level, but some are actually modifiers that affect another actor in some way. Modifiers act on the actor that appears right before. In some cases, a single in-game entity can be described by up to 4 different actors in a row due to modifiers.
Formations of multiple ships are spawned via a combination of at least two actors: First, a formation type describes the number and position of ships and their movement. After that, the next actor describes the type of ships to use in the formation. This pair of actors may be followed by additional modifiers. It seems that some (all?) formations can also appear without a "ship selector", in which case they will default to a certain ship type (varies for each formation).
Actors can be "foreground" (same plane as the player) or "background" (behind the player, no collision). Which actor appears on which layer is hardcoded based on the actor ID.
Finally, it's worth noting that some actors don't have a sprite-based graphical representation, but rely on the level's tile map to have an appropriate tile at the actor's location. When these actors are destroyed, they draw a "destroyed" image on top of the map tiles.
Here's what's known so far:
Foreground actors
ID | Description |
---|---|
1 | 1x1 gray rotating turret |
16 | Shield ship (shoot to reveal a shield pickup) |
19 | Asteroid |
20 | Asteroid, moving faster |
26 | 2x1 turret |
27 | 2x2 turret |
34 | Formation - Flight of 10, flying in a straight line then splitting up left & right. |
35 | Formation - Flight of 6 large ships in a diagonal spanning width of the screen. |
36 | Formation. TODO describe |
37 | Formation - Two groups flying in from both edges of the screen, then meet in the middle and fly up. |
38 | Formation - Like 34? |
39 | Formation - Diagonal of 3 large ships, which split up into 4 smaller ones each. |
40 | Formation - Diagonal of 3 large ships swaying side-to-side, split up into 4 smaller ones each. |
41 | Formation - Flight of 10 in from lower left - split up/down around an oval of space, then back together to leave on the right in a line. Seems to be the same for 42 and possibly onwards? There could well be duplicate formations given the sheer number of them. |
91 | Pickup M |
93 | Pickup S |
94 | Pickup R |
96 | Trigger - End of level |
97 | Modifier - unknown |
116 | Single small white ship, flying towards player. Same as the one spawned using ship selector 20 in a formation. |
118 | Big blue spaceship flying left and right |
122-124 | Trigger - Adjust flying speed (used in speed levels like E1L2, 122 = normal speed) |
133 | Trigger - Turns on forward lights (in dark parts of levels) |
199 | Blue space ship |
203 | Formation ship selector - 1x1 white space ship (same as 116) |
208 | Formation ship selector - 1x1 pair of red & blue spheres |
238 | Prisoner capsule |
258 | Modifier - Make preceding actor appear only in medium or hard difficulty |
259 | Modifier - Make preceding actor appear only in hard difficulty |
Background actors
Note: background actors have X coordinates greater than 16 in the level files. To make them show up correctly, their X coordinate needs to be adjusted by -16 (the game does that when loading the actors).
ID | Description |
---|---|
10 | Stationary green tank |
11 | ??? |
12 | Stationary green tank, animated |
13 | ??? |
22 | Stationary red tank |
23 | ??? |
24 | Stationary red/blue tank/turret |
25 | ??? |
211 | Blue spaceship flying in from below |
212 | Blue spaceship flying in from above |
213 | Same as 211 (TODO: Verify there's really no difference) |
214 | White-blue spaceship flying in from above |
223 | Red spaceship flying in from below |
224 | Red spaceship flying in from above |
225 | Green spaceship flying in from below |
226 | Green spaceship flying in from above |
232 | ??? |
237 | ??? |
Credits
This file format was reverse engineered by K1n9_Duk3. Lethal_guitar, Primož Vovk, and Timixretroplays are working on figuring out the meaning of the actor IDs. 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!)