Yesterday, I wrote about a tool that extends Abiathar, handling a new kind of file that represents a single Keen Galaxy level in a very simple format. I briefly touched on the actual format there, but I figured I should specify it more precisely.
Every number is stored as an unsigned little-endian 16-bit integer (UShort in VB.NET), which I will refer to as a "word". A simple single-level file starts with the level width (in tiles) as a word, followed by the height as a word. Tile data follows, with each tile ID as a word. The three-dimensional data is stored in plane-major then row-major order. The background plane is first, then the foreground, then the infoplane.
Therefore, the third word of one of these files is the background's upper-left tile. The next is the second tile in the first row of the background, and so on.
There is no compression in these files. There is also no place to store a level name or signature (though such data could be stored after the tile data without breaking anything). The format is indeed simple.
No comments:
Post a Comment