Map specifications - PainsPerdus/gboi-kirby GitHub Wiki
Chunk
- 8x8 tiles
- 1 tile = 4 bits
- indicate the type of tiles
- also used for spawners
- 3 bit flags (door at top, door on left, must be a corner)
- note: chunks with only a door on the left are not allowed
- 5 bit of clutter level
Total: 33 bytes
Note: in their compact format, chunks must be sorted by clutter level in ascending order.
Ogmo
2 layers:
- 1 tile layer
background
- 1 entity layer
enemies
4 enemy entities (id)
- Innocent (15)
- Melee (14)
- Ranged1 (13)
- Ranged2 (12)
4 level values:
- top_door (bool)
- left_door (bool)
- corner (bool)
- clutter_level (0 <= x <= 31)
Enemies
- enemies are saved in chunks as "tiles". Their tile id is indicated in parentheses and they have also have a custom tag "Id"
- it is possible to put enemies above background tiles. The latter should be discarded
- the position of the enemies are in absolute coordinates. They must be divided to 8 to fit the grid
Level values
- levels with (top_door, left_door) = (false, true) should be discarded
- clutter_level ~= (number of tiles != empty tile) / 2
Compact format
Format for 1 byte: [thing1 (bits) | thing2 (bits)]
- Tile bytes: [tile_id1(4) | tile_id2(4)] × 32
- Last byte: [door_top(1) | door_left(1) | corner(1) | clutter_level(5)]
Small/Big common room
- four doors = 2 bytes (4 bits / door)
- 1 bit : door open / not open
- 3 bits : key needed to open the door (one-hot encoded)
- note: 1111 = no door
- 16×16 or 24×24 tiles
- 1 tile = 4 bits