Skip to content
Wesley edited this page Jul 16, 2022 · 8 revisions

In depth explanation of KLO files, a.k.a what you play in this engine

In a hex editor, this is what you may see

    |00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
----+------------------------------------------------
0000|AC 1E 00 00 00 00 00 00 00 1F 00 0A 00 05 00 06
0010|10 00 00 00 00 00 00 00 00 00 00 00 00 00 00...
0070|00 00 00 00 01 37 00 60 00 00 00 00 01 43 00 60
0080|00 00 00 00 01 4E 00 60 05 01 3A 00 01 55 00 30
0090|07 00 00 00 01 43 00 4C 43 61 74 63 68 20 69 74
00A0|20 61 74 20 4A 52 48 4E 42 52 21 00 00 00 00 00
00B0|02 00 00 00 01 62 00 49...

Header (0x10)

0x00-0x01 - Magic number, 0xAC1E (AKLEi tried)
0x02-0x03 - File version
0x04 - Level type (2 bits), Compression flag (2 bits)
0x05 - Music and theme ID
0x06-0x07 - Unused
0x08-0x0B - 16 bit Level SIZE
0x0C-0x0F - 16 bit Player position POINT

World

Each tile is one byte. The game reads (W*H, or (0x08)(*0x0A)) amount of tiles from the file and then aligns to 16 bytes. Tile IDs beyond 0xA0 have special purposes, such as designating tiles as non-colliding/background tiles, spikes, etc.

Objects

0x00 - HIBYTE: Type, LOBYTE: Type of typelol
For a list of objects and types, see Objects
0x01 - Properties
0x02-0x03 - Unused yet
0x04-0x07 - 16 bit Position POINT