gurkenlabs / litiengine

LITIENGINE πŸ•Ή The pure 2D java game engine.
https://litiengine.com/
MIT License
725 stars 93 forks source link

Update Tileset specification #465

Closed nightm4re94 closed 7 months ago

nightm4re94 commented 2 years ago

\<tileset>

Can contain at most one: \<image>, , \<grid> (since 1.0), \<properties>, \<terraintypes>, \<wangsets> (since 1.1), \<transformations> (since 1.5)

\<terraintypes>

Deprecated: This element has been deprecated since Tiled 1.5, in favour of the element, which is more flexible. Tilesets containing terrain types are automatically saved with a Wang set instead.

This element defines an array of terrain types, which can be referenced from the terrain attribute of the tile element.

Can contain any number:

\<terrain>

Deprecated: This element has been deprecated since Tiled 1.5, in favour of the element.

name: The name of the terrain type.

tile: The local tile-id of the tile that represents the terrain visually.

Can contain at most one: \<properties>

\<transformations>

This element is used to describe which transformations can be applied to the tiles (e.g. to extend a Wang set by transforming existing tiles).

hflip: Whether the tiles in this set can be flipped horizontally (default 0)

vflip: Whether the tiles in this set can be flipped vertically (default 0)

rotate: Whether the tiles in this set can be rotated in 90 degree increments (default 0)

preferuntransformed: Whether untransformed tiles remain preferred, otherwise transformed tiles are used to produce more variations (default 0)

\<wangsets>

Contains the list of Wang sets defined for this tileset.

Can contain any number: \<wangset>

\<wangset>

Defines a list of colors and any number of Wang tiles using these colors.

name: The name of the Wang set. class: The class of the Wang set (since 1.9, defaults to β€œβ€). tile: The tile ID of the tile representing this Wang set. Can contain at most one: \<properties> Can contain up to 255: \<wangcolor> (since Tiled 1.5) Can contain any number: \<wangtile>

\<wangcolor>

A color that can be used to define the corner and/or edge of a Wang tile.

name: The name of this color. class: The class of this color (since 1.9, defaults to β€œβ€). color: The color in #RRGGBB format (example: #c17d11). tile: The tile ID of the tile representing this color. probability: The relative probability that this color is chosen over others in case of multiple options. (defaults to 0)

Can contain at most one: \<properties>

\<wangtile>

Defines a Wang tile, by referring to a tile in the tileset and associating it with a certain Wang ID.

tileid: The tile ID. wangid: β€œThe Wang ID, given by a comma-separated list of indexes (starting from 1, because 0 means unset) referring to the Wang colors in the Wang set in the following order: top, top right, right, bottom right, bottom, bottom left, left, top left (since Tiled 1.5). Before Tiled 1.5, the Wang ID was saved as a 32-bit unsigned integer stored in the format 0xCECECECE (where each C is a corner color and each E is an edge color, in reverse order).” hflip: Whether the tile is flipped horizontally (removed in Tiled 1.5). vflip: Whether the tile is flipped vertically (removed in Tiled 1.5). dflip: Whether the tile is flipped on its diagonal (removed in Tiled 1.5).