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

Implement support for tileset collision #335

Open
steffen-wilke opened this issue Apr 10, 2020 · 2 comments
Open

Implement support for tileset collision #335

steffen-wilke opened this issue Apr 10, 2020 · 2 comments
Labels
feature tmx our specification of the Tiled map format.

Comments

@steffen-wilke
Copy link
Contributor

steffen-wilke commented Apr 10, 2020

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

@steffen-wilke steffen-wilke added this to the v0.4.21-alpha milestone Apr 10, 2020
@TheRamenChef
Copy link
Collaborator

I think, more generally, we need to update the engine to support Tiled 1.3.

@TheRamenChef
Copy link
Collaborator

I've added support for parsing tile collision information; it still needs to be actually loaded into the collision engine.

@steffen-wilke steffen-wilke removed this from the v0.5.1-beta milestone Dec 4, 2021
@nightm4re94 nightm4re94 added the tmx our specification of the Tiled map format. label Jul 20, 2022
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

3 participants