Raptor

From ModdingWiki
Jump to navigation Jump to search
Raptor
Raptor.png
There is no image of a modified version of this game — upload one!
Levels?Tick.png Editable
Tiles?Tick.png Editable
Sprites?Tick.png Editable
Fullscreen?Tick.png Editable
Sound?X mark.svg Not editable
Music?Tick.png Editable
Text?Tick.png Editable
Story/cutscenes?X mark.svg Not editable
UI/menus?X mark.svg Not editable
Demos?Unknown

Tools

The following tools are able to work with this game.

Name PlatformArchives Levels Graphics Music Sounds Text Saves .exe patch Notes
Camoto Linux/WindowsEditNoSomeNoNoNoNoNo
Camoto/gamearchive.js AnyEditNoNoNoNoNoNoNo
Raptor Map Editor AnyEditEditSomeEditNoNoNoNo

Related links

File formats

The following file formats are used by this game.

Filename Format Details
*.glb GLB Format (Raptor) Archive file storing most of the game data files
*.ini ASCII text Configuration file storing game settings
*_agx Raptor Animated Graphics Files used for Raptor fullscreen cutscenes.
genmidi_op2 OP2 Bank Format OPL FM patches for MIDI instruments
lastscr?_txt B800 Text Text-mode exit screens
*_dat VGA Palette 6-bit VGA palette
*_fx 8-bit PCM, unknown header Sound effects
SPRITE?_ITM Raptor sprite library Enemy and object definitions for a sprite bank
FLATSG?_ITM Raptor tile properties Destructibility, hit points and bounty values for tiles
*_itm ? Other binary data tables
*_map Raptor Level Format Game levels, including tile grids and actor placements
*_mus MUS Format Background music
*_pic, *_blk Raptor PIC Format Various images and full-screen graphics
*_rec Raptor Demo Format Pre-recorded demo macros
startg?tiles .. endg?tiles Raptor Tileset Format Tiles used to draw game levels
*_txt ASCII text Text for various game screens

Actor data (resolved fields)

Each actor (enemy or object placement) is six INT32LE values. The four fields previously marked as needing investigation are resolved below from the released DOS source (MAP.H and ENEMY.C), validated byte-for-byte against the shipped v1.2 data. In the game source this record is the 24-byte CSPRITE structure.

Offset Type Source name Meaning
0x00 INT32LE link Spawn-group chain. See Spawn order below. 0 means the next actor spawns with this one; 1 or -1 ends the group.
0x04 INT32LE slib Index into the SPRITEn_ITM sprite library (see Sprite library). This selects the enemy or object type.
0x08 INT32LE x Tile-grid column, 0–8.
0x0C INT32LE y Tile-grid row, 0–139. See Spawn order for why actors do not use rows 140–149.
0x10 INT32LE game Sprite bank 0–3, selecting which of the four SPRITEn_ITM libraries slib indexes.
0x14 INT32LE level Difficulty gate. 3 = easy, 4 = medium and 5 = hard; 1, 2 and 6 are secret tiers; other values never spawn. Easy actors spawn on every difficulty, medium actors on veteran and above, and hard actors only on elite.

Spawn order

The engine spawns actors with a forward-only cursor over the actor list (ENEMY_Think). A group is a run of consecutive actors chained by link until an actor has link set to 1 or -1. The whole group spawns when the scrolling map reaches the head actor's y row.

Because the cursor only moves forward and the map scrolls from row 139 toward row 0:

  • Group heads must appear in descending-y order in the list.
  • Every group head's y must be 139 or less.

If either condition is violated, the cursor stalls and every actor after the offending entry silently fails to spawn. This is why placements do not use rows 140–149, and why a level editor must re-sort groups by descending head y after edits. All 27 shipped levels satisfy this invariant.

Sprite library (SPRITEn_ITM)

slib indexes an array of 528-byte SPRITE records defined in MAP.H. These are stored as the GLB items SPRITE1_ITM through SPRITE4_ITM, one per bank. The engine derives the entry count from the item's byte size, so appending complete records adds enemy types without a code change.

Each record contains the GLB item name of its first graphic frame, hit points, bounty, explosion type, as many as 24 gun mounts, as many as 24 engine-flame positions, and as many as 30 flight-path waypoints with a movement or AI type. Enemy behaviour is therefore largely data-driven.

Record layout (all values are little-endian):

Offset Type Field
0x00 char[16] iname — GLB item name of the first graphic frame
0x10 INT32LE × 26 item, bonus, exptype, shotspace, ground, suck, frame_rate, num_frames, countdown, rewind, animtype, shadow, bossflag, hits, money, shootstart, shootcnt, shootframe, movespeed, numflight, repos, flighttype, numguns, numengs, sfx, song
0x78 INT16LE × 144 shoot_type[24], engx[24], engy[24], englx[24], shootx[24], shooty[24]
0x198 INT16LE × 60 flightx[30], flighty[30] — waypoint offsets from the spawn anchor

The known flighttype values are:

  • 0: repeat — ping-pongs between the last waypoint and waypoint repos.
  • 1: linear — follows the waypoint list once and leaves.
  • 2: kamikaze — follows the waypoint list, then dives at the player.
  • 35: ground variants — ignore waypoints and scroll with the terrain.

Tile properties (FLATSGn_ITM)

Each bank has an array of 8-byte FLATS records, one per tile and in the same order as the tile graphics.

Offset Type Field
0x00 INT32LE linkflat — tile index displayed after this tile is destroyed. A value equal to the tile's own index makes it indestructible.
0x04 INT16LE bonus — hit points or bonus ID
0x06 INT16LE bounty — money awarded when destroyed

GLB items that make up a level

Levels and their supporting data are named items inside the game's GLB archives:

  • MAPwGs_MAP — level data in this format, for wave w 1–9 of sector s 1–3.
  • SPRITEn_ITM — sprite library for bank n 1–4.
  • FLATSGn_ITM — tile-property table for bank n 1–4.
  • STARTGnTILES through ENDGnTILES — marker-delimited run of 32×32 tile graphics for bank n 1–4. A cell's graphic is the item at STARTGnTILES + 1 + tile number.

Because GLB item IDs are positional, an editor that rebuilds an archive must preserve item order. See GLB Format (Raptor).

Credits

The actor-field resolution, spawn-order invariant, sprite-library, tile-property and GLB-item documentation were reverse-engineered from the released Raptor DOS source and validated byte-for-byte against the shipped v1.2 data by Alexbeav and contributors to the Raptor Map Editor project in 2026. Original page and tile/header documentation is credited to the earlier contributors.