-
Notifications
You must be signed in to change notification settings - Fork 1
Tile Specification Format
The tile file, ie. the tile which defines which graphics are used for a tile, if the tile is collidable or not, etc., should support the following features:
- multi frame animated tiles
- TexCoord animated tiles (waterfall)
- multiple tiles per image
- efficent storage of tiles in OpenGL textures
They should not support:
- support for the different graphics layers (color/light/highlight) turned out to be more throuble then good so it got removed, instead you should be able to place a complete tilemap on the highlight layer.
Below is what we currently have, more or less, its far from final.
{{{ (windstille-tiles ;; Tile-Groups group different tiles together, this is used in ;; the editor, so that tiles can be selected by topic (tilegroup (name "Virtual Reality") (tiles 31 30 114 ...))
;; The given image is cut into 32x32 grid, 'ids' gives which ids are assigned to ;; which grid piece, 'colmap' specfies the same for the collision properties. ;; This would not support animations, but it shouldn't be a problem for the most ;; number of tiles. (tiles (image "tiles/foo.png") ;; width/height (in tiles) are used so that the editor knows which part of an image are used ;; this is usefull since you can then resize the tile-image without breaking the id/colmap setting ;; it is not strictly necessary, but it should give a smoother workflow, since work on the ;; tile-image doesn't break the mapping (width 16) (height 16) ;; Ids for tiles in the image (ids 0 1 2 3 4 5 6 7 8) ;; Collision information for tiles in the images (number is a bitmask) (colmap 0 0 1 0 0 1 1 1 1))
;; Sprite based tiles, used for animation (not yet handled by the engine) (tile (id 13) (sprite "images/tile13.sprite") (colmap 0)) ) }}}