Skip to content

Implement support for tileset collision #335

@steffen-wilke

Description

@steffen-wilke

Currently, we don't support tileset collision information configured in Tiled.

image

In the end, this results in an objectgroup XML element in the tileset (.tsx).

Example tileset:

<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.2" tiledversion="1.2.3" name="tileset" tilewidth="8" tileheight="8" tilecount="256" columns="16">
 <image source="tileset.png" width="128" height="128"/>
 <tile id="7">
  <animation>
   <frame tileid="7" duration="300"/>
   <frame tileid="8" duration="100"/>
  </animation>
 </tile>
 <tile id="21">
  <objectgroup draworder="index">
   <object id="4" x="0" y="0" width="8" height="8"/>
  </objectgroup>
 </tile>
 <tile id="37">
  <objectgroup draworder="index">
   <object id="2" x="0" y="0" width="8" height="8"/>
  </objectgroup>
 </tile>
</tileset>

Once we support this, we should also think about generating static CollisionBoxes from it when loading a map.

This was originally reported in our community forum: https://forum.litiengine.com/d/118-customise-movement-to-repeat-until-stopped

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuretmxour specification of the Tiled map format.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions