Cave Tilesetdef

The “Tilesetdef” file for the Cave tileset is complete and checked in.

For those wondering, this is the file spec:

The first line is the name of the .png file for the tileset. It’s assumed this file will be in the images/tilesets folder.

Each line after that contains the following data:

  • index,x,y,w,h,offset_x,offset_y

where

  • index is a two-digit (always two-digit) hex value from 00-ff. This corresponds to map layer data in the map files (note, often the map files are encoded in decimal instead, so you might have to do the conversion to match them up)
  • x,y is the top-left corner of this tile image
  • w,h is the width-height of this tile image
  • offset_x and offset_y describe where the tile should be drawn in relation to the base/floor tile slot. Assuming a rhombus-shaped isometric tile, the offset (0,0) is the exact center of the rhombus. Screen left (-x) and up (-y) are positive offsets.

Tilesets are not arranged exactly the same way each time e.g. swapping tilesets on a map does not yield a usable map. But the tiles are put into these basic categories. (The categories above 0f are not enforced in any way, this is just to help keep them organized)

  • tiles 00-0f are reserved for collision types
  • tiles 10-3f are floors
  • tiles 40-7f are walls
  • tiles 80-bf are standalone objects
  • tiles c0-ff are oddly-shaped, multi-tiled, or special tiles
2010/11/16

Leave a Reply

Your email address will not be published. Required fields are marked *