Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tileset specification #465

Closed
4 tasks done
nightm4re94 opened this issue Jul 20, 2022 · 0 comments
Closed
4 tasks done

Update Tileset specification #465

nightm4re94 opened this issue Jul 20, 2022 · 0 comments
Labels
feature tmx our specification of the Tiled map format.

Comments

@nightm4re94
Copy link
Member

nightm4re94 commented Jul 20, 2022

<tileset>

  • class: The class of this tileset (since 1.9, defaults to “”).
  • objectalignment: Controls the alignment for tile objects. Valid values are unspecified, topleft, top, topright, left, center, right, bottomleft, bottom and bottomright. The default value is unspecified, for compatibility reasons. When unspecified, tile objects use bottomleft in orthogonal mode and bottom in isometric mode. (since 1.4)
  • tilerendersize: The size to use when rendering tiles from this tileset on a tile layer. Valid values are tile (the default) and grid. When set to grid, the tile is drawn at the tile grid size of the map. (since 1.9)
  • fillmode: The fill mode to use when rendering tiles from this tileset. Valid values are stretch (the default) and preserve-aspect-fit. Only relevant when the tiles are not rendered at their native size, so this applies to resized tile objects or in combination with tilerendersize set to grid. (since 1.9)

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).

@nightm4re94 nightm4re94 added feature tmx our specification of the Tiled map format. labels Jul 20, 2022
steffen-wilke added a commit that referenced this issue Dec 28, 2023
- Reimplement tile terrain support against the Wang implementation (We no longer support the deprecated Tiled terrain which was deprecated with Tiled 1.5)
- Some of the newly introduced properties are just mapped to ensure compatibility when serializing (e.g. objectalignment, fillmode, ...). These settings are not supported by the engine but are kept for informational purposes.

Fixes #465
steffen-wilke added a commit that referenced this issue Dec 28, 2023
Fix some style issues

Fixes #465
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature tmx our specification of the Tiled map format.
Projects
None yet
Development

No branches or pull requests

2 participants