God of Thunder Level Format

From ModdingWiki
Jump to: navigation, search
God of Thunder Level Format
God of Thunder Level Format.png
Format typeMap/level
Map type2D tile-based
Layer count3
Tile size (pixels)16×16
Viewport (pixels)320×192

The God of Thunder Level Format is used by God of Thunder to store each game level.

File format

The file consists of multiple 512-byte levels, one after the other. There is no global header. Each level is structured as follows.


There is no signature, however careful processing of the files can be used to check whether the format is correct:

  • There are 230 tiles in the background layer, so no background code should be larger than 229.
  • There are 32 tiles in the object layer, so no object ID should be larger than 31.


The file contains two layers.

Data type Name Description
UINT8[240] background Background layer, one byte for each of the 20×12 cells in the map
UINT8 defaultBG Tile to draw behind other background tiles that have transparent areas (e.g. rocks)
UINT8 song ID of song ! How does this map to song files?
UINT8[16] actorID IDs of 16 actors
UINT8[16] actorPos Coordinates of each object (y × 20 + x)
UINT8[48] unknown ! ?
UINT8[30] objectID IDs of 30 objects
UINT16LE[30] objectX X-coordinate of each object
UINT16LE[30] objectY Y-coordinate of each object
UINT8[10] holeScreen Destination screen number of each hole/door (one value for tiles 0xDC to 0xE5 inclusive)
UINT8[10] holeDestPos Player target position on destination screen (y × 20 + x)
UINT8[20] unknown ! ?

Tile mapping

Each code in the background layer is a tile index in the corresponding sdat[123] file.

! How do you map actor IDs into images - do the numbers just match the filenames?

Each object ID is an index into the objects tileset. An object ID of 1 maps to the first tile, ID 2 maps to the second tile, etc. Object ID 0 is used if no object is at that entry. The position is the cell number, with cell 0 being the top-left and cell 239 being the bottom-right.

Screen arrangement, holes and doors

The screens are arranged left to right, ten levels wide. Moving off the left or right of the screen subtracts or adds one to the screen number respectively. Moving off the top or bottom subtracts or adds 10 to the screen number.

Tile numbers 0xDC through 0xE5 are doorways. Some look like holes, while others look like ladders out of the hole. In an underground level, the exit back to the surface must use one of the ladder tiles, otherwise it will simply scroll to the next screen like normal. This is not usually the intention when returning to the surface as there is less control over where the player appears.

The first value in holeScreen is for tile 0xDC, and the last value is for tile 0xE5. Likewise for holeDestPos which specifies the player's position on the destination screen.


Episode Song ID Song filename
1 0 song1
1 1 song2
1 2 song3
1 3 song4
1 4 winsong
1 5 bosssong
1 >=6 song33


This file format was reverse engineered by Malvineous. 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!)