This file documents the apparent structure of the Game Maker 6.x GM6 file format... or at least the important parts for extracting sprite data from the files. This is a work in progress, and represents a "Best Guess" at the structure of the file based on experimenting and observation. It is not an official document and is not intended to be accurate in any way! Last updated 12/14/2004 Size Meaning --------------------------------- DWORD header. 91 D5 12 00 (= 1234321... Talk about tacky...) DWORD Version Data? 58 02 00 00 = Version 6.x DWORD Game Identifier (Global game settings: Loading) Note: This is a full DWORD integer value STRING*16 Unknown. Can be left all 0's. (Possibly tied to registration info?) DWORD Unknown. = 58 02 00 00 (=600) Also seen as 1E 02 00 00 (=542). This seems to have importance to the file structure to follow... Documentation below is based on this DWORD DWORD Start in Full-screen mode (Global game settings: Graphics) DWORD Interpolate Between Colors (Global game settings: Graphics) DWORD Don't draw border in windowed bode (Global game settings: Graphics) DWORD Display the cursor (Global game settings: Graphics) DWORD Scaling (Global game settings: Graphics) 00 = Keep aspect ratio FF = Full scale 01 to 64 = Fixed scale (Value = %) DWORD Allow the player to resize the game window (Global game settings: Graphics) DWORD Let the game window always stay on top (Global game settings: Graphics) DWORD 3 Bytes. (RGB) Color outside the room region (Global game settings: Graphics) DWORD Set the resolution of the screen (Global game settings: Resolution) DWORD Color Depth if Setting Resolution (Global game settings: Resolution) 00 = No Change 01 = 16-bit 02 = 32-bit DWORD Resolution if setting resolution (Global game settings: Resolution) 00 = No Change 01 = 320x240 02 = 640x480 03 = 800x600 04 = 1024x768 05 = 1280x1024 06 = 1600x1200 DWORD Frequency if setting resolution (Global game settings: Resolution) 00 = No Change 01 = 60 02 = 70 03 = 85 04 = 100 05 = 120 DWORD Don't show the buttons in the window caption (Global game settings: Graphics) DWORD Use synchonization to avoid tearing (Global game settings: Resolution) DWORD Let switch between screen modes (Global game settings: Other) DWORD Let shot the game information (Global game settings: Other) DWORD Let End the game (Global game settings: Other) DWORD Let and save and load the game (Global game settings: Other) DWORD Game Process Priority (Global game settings: Other) 00 = Normal 01 = High 02 = Highest DWORD Freeze the game when the form loses focus (Global game settings: Graphics) DWORD Progress Bar options (Global game settings: Loading) 00 = No loading progress bar 01 = Default loading progress bar 02 = Own progress loading bar NOTE: If this option = 2 (Own progress bar), then TWO standard image blocks are inserted immediately after this DWORD... one for back image and one for front image. (Or a DWORD as "FF FF FF FF" is no image selected). DWORD Show your own image while loading (Global game settings: Loading) NOTE: Custom image is inserted after this DWORD as what seems to be a standard image block (Or a DWORD as "FF FF FF FF" is no image selected). DWORD Make image partially transparent (Global game settings: Loading) DWORD Make translucent with alpha value (Global game settings: Loading) value of byte indicates alpha value, 0 to 255 DWORD Scale progress bar image (Global game settings: Loading) DWORD Icon. (Global game settings: Loading) This value is the size of the icon block to follow. (Icon data block omitted. Who cares?) DWORD Display error messages (Global game settings: Errors) DWORD Write error messages to file game_errors.log (Global game settings: Errors) DWORD Abort on all error messages (Global game settings: Errors) DWORD Treat uninitialized variables as value 0 (Global game settings: Errors) DWORD Length of Author's name to follow. (Global game settings: Info) If 0, no name is present. DWORD Game Version (Global game settings: Info) STRING*8 Timestamp for last Changed (Global game settings: Info) Unknown format for this feild. DWORD Length of Information data to follow. (Global game settings: Info) If 0, Information field is blank. DWORD Number of custom constants defined (Global game settings: Constants) If not zero, for each item: DWORD Length of constant name STRING Constant name DWORD Length of constant value STRING Constant value Note: Even numerical constants are stored as strings! DWORD Number of paths for files to include. (Global game settings: Include) If not zero, for each item:0 DWORD Length of string STRING path of file to include DWORD Folder to save the files to 00 = Main folder for the standalone 01 = Temporary folder created for the game DWORD Overwrite existing files (Global game settings: Include) DWORD Remove at game end (Global game settings: Include) DWORD Blocked data to follow DWORD Number of blocks to follow (Can be 0) NOTE: In light of recent evidence, the below comment about "Block dentification" is likely to be wrong. However, it's just an amazing coincidence that it works anyway... For each block -------------- DWORD Unknown = 01 00 00 00 (Valid block tag? Can be 0 if no block defined...) DWORD Length of block name string STRING Block Name Name DWORD Block Identification 1E 02 00 00 = Sprite Definition ? b8 01 00 00 = WAV Sound block ? Sprite blocks ------------- DWORD Width DWORD Height DWORD Bounding Box Left DWORD Bounding Box Right DWORD Bounding Box Bottom DWORD Bounding Box Top DWORD Transparent DWORD Smooth Edges DWORD Preload texture DWORD Unknown = 0 DWORD Precise Collision Checking DWORD Hotspot X DWORD Hotspot Y DWORD Frame Count For each frame: DWORD 0x0A (Frame block ID?) DWORD Size of compressed data stream STRING Compressed data stream NOTE: Size of decompressed data stream is (Height * Width * 3) + 54 Decompressed stream is a standard 24bit bitmap image w/ header. WAV Sound blocks ---------------- DWORD Kind 00 = Normal Sound 01 = Background music 02 = 3D Sound 03 = Use multimedia player DWORD Length of (filename extension?) STRING (Filename Extension?) DWORD Length of (original filename?) STRING (Original filename?) DWORD Unknown = 01 00 00 00 DWORD Length of compressed data stream STRING Compressed data stream DWORD Effects (Add together for combinations) 00 = None 01 = Chorus 02 = Echo 04 = Flanger 08 = Gargle 10 = Reverb DDWORD Volume (8 bytes!?) DDWORD Pan (8 bytes!?) DWORD Preload