[128] Boundary Wrap
- Conlan Walker
- May 10, 2024
- 1 min read
Very boring week this is, since it was spent almost entirely with the scene constructor/compiler/whatever you want to call it. It reads the XML data output of Tiled, in which I'm able to include a representation of the background, objects, tilesets, scene edges, music, ambience, and the actual tile map data. I've finished the parser for everything except object data, which I still need to finish. After that, I can work on putting together the appropriate scene descriptor bytestream stuff.
Something of note about the way collision data is stored: it's set up to use its own tile map layer called "collision" that always uses this tileset, with the tileset IDs' base 2 representation corresponding to the high byte of a tile, which is two bytes in total (low byte is for the tile ID).

For example, every run of 16 tiles (left-to-right, top-to-bottom) corresponds to the 4 bits that make up its collision info (2^4 = 16). every other run of 16 is the same, but the tile is a platform that can be fallen through conditionally (2^4 * 2^2 = 32, yadda yadda). The latter half is a repeat of the first half, except the tile has the 'low surface friction' flag enabled.
Due to the way the tile data is stored, you can have different collision and friction info across multiple tiles even if those tiles have identical ID numbers, which gives a bit more control over its behavior.
Anyway, here's the current work-in-progress code for the converter:
Comments