+==========================================================================================+ |Jazz Jackrabbit Tiles Gaphics format: | +==========================================================================================+ Jazz Jackrabbit has two sort of tiles; tiles for regular levels are stored in BLOCKS.xxx files, this file is used in all levels with filename LEVELy.xxx where xxx is the same; tiles for bonus levels are stored in BONUSy.000 files. The bonus levels contain a string that determines what tile file to use. ******************* Regular tiles ******************* Block files consist of 7 blocks, usually RLE compressed. The first three are palettes and the last four contain blocks of 60 tiles (Max in tileset thus 240 tiles) Of the palettes, the first is used to color the tiles themselves, while the next two are used to draw the background sky in the level. Of the tileset blocks, there are two types. An 'epty' block consists of the two byte string " " (These can be seen at the end of levels.) A 'full' block starts with the two-letter string 'ok' and consists of 60 RLE compressed 'sub-blocks'; one per 32x32 pixel tile ------------------------------------------------------------------------------- FILE STRUCTURE (Uncompressed): 0 768 Til pal Tileset palette; in RGB order. 6-bit stored in 8-bit, so multiply by 4 for "true" value 768 1536 Sky pal Palettes used for the level sky 2304 2 Tileset blocks, four of these. (Empty ones two " " full ones "ok") -> ? Tile 60 of these per tileset block; each RLE compressed ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- PALETTES: The last two palettes are simple enough, and used for the sky in a level. Three 512 pixel high sky images fit into a level, stacked on top of each other. The sky paralaxes relative to the tiles. The first palette is used for the tiles, but certain colors are set aside for certain things: Global colors are the same, or similar in all levels, and used for stuff like sprites, as well as tiles. The colors can change slightly (From red to brownish say) and not affect the look of the game too much, but things will look odd if they are altered significantly (Unless theyt are not used by the sprites, etc in that level.) Other colors will animate or shift and so shouldn't be used too much, this really does limit the colors available, but with correct level parameters, more can be freed up. Color Use 0-15 Global white and grey 16-22 Global green 23-29 Global blue 30 Global grey 31 Background color (When background used with event, usually black) 32-47 Global red 48-63 Globabl green 2 64-74 Customizable 75-79 Global yellow 80-87 Global purple 88-95 Global orange/brown 96-111 Customizable (Transparent to sun tile only) 112-115 Color animation 1 116-123 Color animation 2 124-126 Color animation 3? 127 Tile transparency 128-191 Parallax animation 192-223 Color animation 4 224-255 ??? ------------------------------------------------------------------------------- ******************* Bonus tiles ******************* Bonus tile files consist of three RLE compressed blocks (Images.) The first is the sky used in the bonus level (Complete with mountains or buildings and what have you.) the second is the palette used for everything and the third is the tileset itself. Bonus tileset blocks don't have the 'ok' marker used in normal tiles and there is only ever 1 tile block (60 tiles.) The decompressed block is 64'000 bytes, of which the last 2560 bytes (2.5 tiles worth) is just padding. The bonus tile block is also notable for not having every tile RLE compressed, but the whole 60-tile block instead. ------------------------------------------------------------------------------- FILE STRUCTURE (Uncompressed): 0 26624 832x32 bonus sky image, including some sort of useless data 26624 768 Pal Palettes used for the level 27392 64000 Tiles 60 tile block -------------------------------------------------------------------------------