Skip to content

Instantly share code, notes, and snippets.

@kvanbere
Last active August 29, 2015 13:56
Show Gist options
  • Save kvanbere/8946315 to your computer and use it in GitHub Desktop.
Save kvanbere/8946315 to your computer and use it in GitHub Desktop.
<Action*> {
0 4b Library ID
4 4b Action ID
8 4b Kind
C 4b Relative
10 4b Question
14 4b Applies to something
18 4b Type
1C 4b Offset to function name
20 4b Offset to function code
24 4b Arguments used
28 4b Applies to object
2C 4b Is relative
30 4b Not?
34 4b Arguments
For Arguments {
0 4b Argument kind
4 4b Offset to argument string
}
0 4b Unknown
4 4b Unknown
}
<EventEntry*> {
0 4b Count
For Count {
0 4b Offset to EventNumb Entry
}
[ EventNumb Entry ]
{
0 4b Event Number
0 4b Count
For Count {
0 4b Offset to Action Entry
}
}
}
<OBJT> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to object entry
}
[ Object Entry ]
{
0 4b Offset to object name
4 4b Sprite Index
8 4b Visible
C 4b Solid
10 4b Depth
14 4b Persistent
18 4b Parent ObjectIndex
1C 4b Mask SpriteIndex
[ New Additions as of EA v1.99.44 ]
20 4b Uses Physics
24 4b Collision Shape [Enum] ? {
0 Circle
1 Box
2 Shape
}
28 4b Unknown
2C 4b Density (float)
30 4b Restitution (float)
34 4b Collision Group
38 4b Linear Damping
3C 4b Angular Damping
40 4b Unknown (Sensor?)
44 4b Friction
48 4b Start Awake?
4C 4b Kinematic?
20 4b Numer of events (Const 12 as of EAv1.99.44)
For 12 {
0 4b Offset to EventEntry
}
}
}
<CODE> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to CodeEntry
}
[ CodeEntry ]
<CodeEntry> {
0 4b Offset to script name (string) [ Ex: gml_Object_Controller_Create_0 ]
0 4b Size { Bytecode }
}
}
<FUNC> {
}
<VARI> {
}
<TXTR> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to Texture Sheet (PNG File)
4 ?b <Padding to align PNG file on 128 byte boundaries>
0 ?b Uncompressed Stream { <PNG File> }
}
}
<Action*> {
0 4b Library ID
4 4b Action ID
8 4b Kind
C 4b Relative
10 4b Question
14 4b Applies to something
18 4b Type
1C 4b Offset to function name
20 4b Offset to function code
24 4b Arguments used
28 4b Applies to object
2C 4b Is relative
30 4b Not?
34 4b Arguments
For Arguments {
0 4b Argument kind
4 4b Offset to argument string
}
0 4b Unknown
4 4b Unknown
}
<EventEntry*> {
0 4b Count
For Count {
0 4b Offset to EventNumb Entry
}
[ EventNumb Entry ]
{
0 4b Event Number
0 4b Count
For Count {
0 4b Offset to Action Entry
}
}
}
<OBJT> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to object entry
}
[ Object Entry ]
{
0 4b Offset to object name
4 4b Sprite Index
8 4b Visible
C 4b Solid
10 4b Depth
14 4b Persistent
18 4b Parent ObjectIndex
1C 4b Mask SpriteIndex
[ New Additions as of EA v1.99.44 ]
20 4b Uses Physics
24 4b Collision Shape [Enum] ? {
0 Circle
1 Box
2 Shape
}
28 4b Unknown (Shape points?)
2C 4b Density (float)
30 4b Restitution (float)
34 4b Collision Group
38 4b Linear Damping
3C 4b Angular Damping
40 4b Unknown (Sensor?)
44 4b Friction
48 4b Start Awake?
4C 4b Kinematic?
20 4b Number of main events (Const 12 as of EAv1.99.44)
For 12 {
0 4b Offset to EventEntry
}
}
}
<CODE> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to CodeEntry
}
[ CodeEntry ]
<CodeEntry> {
0 4b Offset to script name (string) [ Ex: gml_Object_Controller_Create_0 ]
0 4b Size { Bytecode }
}
}
<FUNC> {
[ Header ]
0 4b Size [ Count will be Size / 12 (dec) ]
[ FuncEntry ]
<FuncEntry> {
0 4b Offset from the start of the file to the function name, eg. show_message
0 4b Patch Information?
0 4b Offset to instruction in code (beg), eg. parameter count
}
}
<VARI> {
[ Header ]
0 4b Size
[ VariEntry ]
<VariEntry> {
0 4b Offset from the start of the file to the variable name
0 4b Patch Information?
0 4b Offset to instruction in code (beg)
}
}
<TXTR> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to Texture Sheet (PNG File)
4 ?b <Padding to align PNG file on 128 byte boundaries>
0 ?b Uncompressed Stream { <PNG File> }
}
}
iOS Format [GM9 Format?]
v1.1c
December 19th, 2010
This document loosely follows IsmAvatar's documenting style, mostly because it
worked really well for the EXE format. Since this magical runner YYG's working on
has been ported to PSP, iOS and Android it's most likely going to work its way
onto the PC and Mac, meaning that it's possible this is the format the C++ runner
will use on PC and Mac. The PC and Mac specific information also strongly supports
this theory.
Note that this format follows surprisingly close to the EXE format with some
global differences. This, in turn, means that this format is very
similar to the GMK format as well.
Comments will be inside brackets, [ ]
Likely, but not verified values will have a question mark, ?
GMK Format (>=v5.3a): http://www.google.com/lgm/formats/gmformat8.txt // ism
EXE Format (==v8.0 ): http://www.google.com/decompiler/EXEFormat.txt // dat
Note: Due to the limited number of games, and a lack of a compiler at the time
of this document's compilation, information on every section is volatile,
while other sections are completely unknown.
Note: As far as I know, Triggers do not exist in this format, not sure if that's
done on purpose, because YYG forgot to add them, they're being depreciated or
simply because I can't find them. Either way, they're not documented.
--- Sections ---
The format is split into 19 seperate sections, each section contains a specific type
of data and a specific format. All of these sections are children of the root
section, FORM. The FORM Tag ID is about as close as you're going to get to a magic number.
Sections use the following format:
0 4b Tag ID
4 4b Size of section
8 ?b Payload
--- Tags ---
FORM [46 4F 52 4D]: Root
GEN8 [47 45 4E 38]: Generate ("Catch-All")
OPTN [4F 50 54 4E]: Options
HELP [48 45 4C 50]: Game Information
EXTN [45 58 54 4E]: Extentions
SOND [53 4F 4E 44]: Sounds
SPRT [53 50 52 54]: Sprites
BGND [42 47 4E 44]: Backgrounds
PATH [50 41 54 48]: Paths
SCPT [53 43 50 54]: Scripts
FONT [46 4F 4E 54]: Fonts
TMLN [54 4D 4C 4E]: Time Lines
OBJT [4F 42 4A 54]: Objects
ROOM [52 4F 4F 4D]: Rooms
DAFL [44 41 46 4C]: Data Files
TPAG [54 50 41 47]: Texture Packaging information
STRG [53 54 52 47]: Strings
TXTR [54 58 54 52]: Textures (1024x1024 sheets)
AUDO [41 55 44 4F]: Audio
--- Main Format ---
<FORM> {
<GEN8, OPTN, HELP, EXTN, SOND, SPRT, BGND, PATH, SCPT, FONT, TMLN,
OBJT, ROOM, DAFL, TPAG, STRG, TXTR, AUDO>
}
<End Of File>
--- Section Payload ---
<GEN8> {
0 4b Version
4 4b Offset to Game Center Unique ID
8 4b Last object placed
C 4b Last tile placed
10 2b Unknown
12 1b Pro flag?
13 1b Debug flag?
14 4b Game ID?
18 16b UUID/GUID?
34 4b Count
For Count {
0 4b Room ID
}
}
<OPTN> {
0 4b Start in fullscreen
4 4b Interpolate colors
8 4b Don't draw a border in windowed mode
C 4b Display cursor
10 4b Scaling
14 4b Allow player to resize window
18 4b Window always on top
1C 4b Color outside room
20 4b Set resolution
24 4b Color depth
28 4b Resolution
2C 4b Frequency
30 4b Don't show buttons in windowed mode
34 4b Use sync to avoid tearing
38 4b Disable screensavers
3C 4b Let F4 switch
40 4b Let F1 show game info
44 4b Let Esc end
48 4b Let F5 and F6 save/load
4C 4b Let F9 take a screenshot
50 4b Treat close as esc
54 4b Priority
58 4b Freeze when form loses focus
5C 4b Loading progress bar
60 4b Show own image
64 4b Make image partially transparent
68 4b Make translusent
6C 4b Size of icon data
70 4b Display errors
74 4b Write errors
78 4b Abort on all error
7C 4b Treat uninitialized variables as 0
80 4b Count
For Count {
0 4b Offset to constant name
4 4b Offset to constant value
}
}
<HELP> {
0 4b BG Color
4 4b Show in seperate window
8 4b Offset to window caption ("Game Information")
C 4b Left
10 4b Top
14 4b Width
18 4b Height
1C 4b Show border
20 4b Allow player to resize
24 4b Stay on top
28 4b Freeze game while help form is in focus
2C 4b Offset to RTF game info
}
[ This section is completely unknown, this is what it may look like ]
<EXTN> {
0 4b Count
For Count {
0 4b Offset to name
4 4b Offset to temp name
8 4b Count
For Count {
0 4b Offset to filename
4 4b Type
8 4b Offset to initialization code
C 4b Offset to finalization code
10 4b Count*
For Count {
0 4b Offset to name
4 4b Offset to external name
8 4b CallType
C 4b Internal ID?
10 4b ArgumentCount
For ArgumentCount {
0 4b ArgumentKind
}
0 4b ConstantCount
For ConstantCount {
0 4b Offset to constant name
4 4b Offset to constant value
}
}
For Count* {
0 4b LenOfData { <FileData> }
}
}
}
}
<SOND> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to sound entry
}
[ Sound Entry ]
{
0 4b Offset to sound name
4 4b Type
8 4b Offset to filename extention (".wav")
C 4b Offset to filename ("sound.wav")
10 4b Effects
14 8b Volume
1C 8b Pan
24 4b Preload
28 4b AUDO Index
}
}
<SPRT> {
[ Header]
0 4b Count
For Count {
0 4b Offset to sprite entry
}
[ Sprite Entry ]
{
4 4b Offset to name
8 4b Width
C 4b Height
10 4b Left bounding box
14 4b Right bounding box
18 4b Bottom bounding box
1C 4b Top bounding box
For 5 {
0 4b Unknown (Boolean) [ Alternates between 1 and 0, starts with 1 ]
}
0 4b Origin-X
4 4b Origin-Y
8 4b Subimages
For Subimages {
0 4b Offset to TPAG data
}
0 4b Seperate collision mask
For ceil(width / 8) * height {
0 1b Eight pixels of mask data
}
}
}
<BGND> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to background entry
}
[ Background Entry ]
{
0 4b Offset to background name
4 2b Tile width
6 2b Tile height
8 2b Horz offset
A 2b Vert offset
C 2b Horz sep
E 2b Vert sep
10 4b Offset to TPAG data
}
}
<PATH> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to path entry
}
[ Path Entry ]
{
0 4b Offset to path name
4 4b Connection type
8 4b Closed
C 4b Precision
10 4b Count
For Count {
0 4b X
8 4b Y
10 4b Speed
}
}
}
<SCPT> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to script entry
}
[ Script Entry ]
{
0 4b Offset to script name
4 4b Offset to script contents
}
}
<FONT> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to font entry
}
[ Font Entry ]
{
0 4b Offset to font name
4 4b Offset to font filename
8 4b Font size
C 4b Bold
10 4b Italic
14 4b Char range min
18 4b Char range max
1C 4b Offset to TPAG entry
}
}
<Action*> {
0 4b Library ID
4 4b Action ID
8 4b Kind
C 4b Relative
10 4b Question
14 4b Applies to something
18 4b Type
1C 4b Offset to function name
20 4b Offset to function code
24 4b Arguments used
28 4b Applies to object
2C 4b Is relative
30 4b Not?
34 4b Arguments
For Arguments {
0 4b Argument kind
4 4b Offset to argument string
}
0 4b Unknown
4 4b Unknown
}
<EventEntry*> {
0 4b Count
For Count {
0 4b Offset to EventNumb Entry
}
[ EventNumb Entry ]
{
0 4b Event Number
0 4b Count
For Count {
0 4b Offset to Action Entry
}
}
}
[ This section is completely unknown, this is what it may look like ]
<TMLN> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to time line entry
}
[ Time Line Entry ]
{
0 4b Offset to time line name
4 4b MomentCount
For MomentCount {
0 4b Offset to MomentData entry
}
}
[ MomentData Entry ]
{
0 4b Moment position
4 4b Offset to Action Entry
}
}
<OBJT> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to object entry
}
[ Object Entry ]
{
0 4b Offset to object name
4 4b Sprite Index
8 4b Visible
C 4b Solid
10 4b Depth
14 4b Persistent
18 4b Parent ObjectIndex
1C 4b Mask SpriteIndex
20 4b Numer of events - 1
For 12 {
0 4b Offset to EventEntry
}
}
}
<ROOM> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to room entry
}
[ Room Entry ]
{
0 4b Offset to room name
4 4b Offset to room caption
8 4b Width
C 4b Height
10 4b Room Speed
14 4b Persistent
18 4b BG Color
1C 4b Draw BG color
20 4b Offset to room creation code
24 4b Enable use of views
28 4b Offset to background data entry
2C 4b Offset to view list entry
30 4b Offset to instance list entry
34 4b Offset to tile list entry
}
[ BackgroundList Entry ]
{
0 4b Count
For Count {
0 4b Offset to background entry
}
}
[ Background Entry ]
{
0 4b Visible when room starts
4 4b Foreground
8 4b Background Index
C 4b X
10 4b Y
14 4b Tile Horz
18 4b Tile Vert
1C 4b Stretch
}
[ ViewList Entry ]
{
0 4b Count
For {
0 4b Offset to view entry
}
}
[ View Entry ]
{
0 4b Visible when room starts
4 4b View X
8 4b View Y
C 4b View W
10 4b View H
14 4b Port X
18 4b Port Y
1C 4b Port W
20 4b Port H
24 4b Horz border
28 4b Vert border
2C 4b Horz speed
30 4b Vert speed
34 4b Follow ObjectIndex
}
[ InstanceList Entry ]
{
0 4b Count
For Count {
0 4b Offset to instance entry
}
}
[ Instance Entry ]
{
0 4b X
4 4b Y
8 4b ObjectIndex
C 4b ID
10 4b Offset to creation code
}
[ TileList Entry ]
{
0 4b Count
For Count {
0 4b Offset to tile entry
}
}
[ Tile Entry ]
{
0 4b X
4 4b Y
8 4b BackgroundIndex
C 4b Tile Y
10 4b Tile X
14 4b Width
18 4b Height
1C 4b Depth
20 4b ID
}
}
[ This section is completely unknown, this is what it may look like ]
<DAFL> {
0 4b Count
For Count {
0 4b Offset to Include Entry
}
[ Include Entry ]
{
0 4b Offset to filename
4 4b Offset to original filename
8 4b Original file chosen
C 4b Original file size
10 4b Offset to File Data
14 4b Export
18 4b Offset to folder to export to
1C 4b Overwrite
20 4b Free memory
24 4b Remove at end of game
}
}
<TPAG> {
[ Header ]
0 4b Count
For Count {
0 4b offset to texture package entry
}
[ TexturePackage Entry ]
{
0 2b Sprite X on sheet
2 2b Sprite Y on sheet
4 2b Sprite width on sheet
6 2b Sprite height on sheet
8 2b Subframe X
A 2b Subframe Y
C 2b Subframe Width
E 2b Subframe Height
10 2b Canvas width
12 2b Canvas height
14 2b Texture ID
}
}
[ Every string is null terminated ]
<STRG> {
0 4b Count
For Count {
0 4b Offset to string
}
[ String ]
{
0 4b Length
0 ?b Value
}
}
<TXTR> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to texture entry
}
[ Texture Entry, image is in RAW format ]
{
0 4b RAW Magic
4 4b Width
8 4b Height
C 4b Pixel Format [ RGBA, 0 = 32bit, 1 = 24bit (8888 format) ]
For Width * Height {
0 4b Pixel
}
}
}
[ This is for *.wav and *.mid files only, *.mp3s are stored externally with the game data ]
<AUDO> {
[ Header ]
0 4b Count
For Count {
0 4b Offset to audio entry
}
[ Audio Entry ]
{
0 4b Length
For Length {
0 1b Audio Data, RIFF format
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment