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

Support multiple named animations per Tile #986

Open
Rialgar opened this issue Jun 16, 2015 · 5 comments
Open

Support multiple named animations per Tile #986

Rialgar opened this issue Jun 16, 2015 · 5 comments
Labels

Comments

@Rialgar
Copy link

@Rialgar Rialgar commented Jun 16, 2015

I would really like to have multiple (named) animations on one tile, this is especially useful for objects, since these might change their animation during the game.
Some examples:

  • Collectibles that make a little splosh when collected
  • Enemies that can walk, stand, die, ...
  • A Goal that shows a nice animation when reached
    It would be great to have all these animation specifications in a single place, and I think the Tiled file would be an excellent location.

For the time being I will probably create each animation on the starting tile and add the names as custom properties.

@bjorn bjorn added the feature label Jun 16, 2015
@IMMZ
Copy link
Contributor

@IMMZ IMMZ commented Aug 6, 2015

I have no idea why the animations is linked to the tiles. I think it would be useful just save animations under the 'map' node, linking them to the map. The only thing to be change is tile ids - they should have absolute values (like on the layers), not relative to the tileset. It will allow to make animations from different tilesets and to have multiply animations on the map - easy and useful. Each animation should have 'id' and 'name' property then the users could find them on the map and set them to their objects in their code.

Idea looks like

<map version="1.0" orientation="orthogonal" renderorder="right-down" width="50" height="50" tilewidth="32" tileheight="32" nextobjectid="12">
  <animation id="0" name="character_walk">
    <frame tileid="120" duration="100"/>
    <frame tileid="121" duration="100"/>
    <frame tileid="122" duration="100"/>
    <frame tileid="123" duration="100"/>
    <frame tileid="124" duration="100"/>
    <frame tileid="125" duration="100"/>
  </animation>
  <animation id="1" name="character_jump">
    <frame tileid="15" duration="100"/>
    <frame tileid="16" duration="100"/>
    <frame tileid="17" duration="100"/>
    <frame tileid="18" duration="100"/>
    <frame tileid="19" duration="100"/>
  </animation>
...
@bjorn
Copy link
Member

@bjorn bjorn commented Aug 6, 2015

The reason animations are defined in the tileset is because the expectation is that you will define the animation once, then save it along with an (external) tileset, and use this tileset in many maps. If the animation was saved in the map, then the only way to use it in another map is to copy it over. And then it also gets really annoying when you want to change that animation, because of having multiple copies.

Defining animations using frames from multiple tilesets seemed like a very rare use-case in comparison, so I decided not to support that.

@bjorn
Copy link
Member

@bjorn bjorn commented Sep 12, 2018

Just adding a note that this request was also mentioned on the forum.

@Phlosioneer
Copy link
Contributor

@Phlosioneer Phlosioneer commented Dec 17, 2019

There is a bounty on this issue, so it should probably have a bounty tag.

@bjorn
Copy link
Member

@bjorn bjorn commented Dec 17, 2019

@Phlosioneer Thanks for checking the bounties. I've opted to simply delete that tag since there really isn't much happening with BountySource to make it worth it. Any bounties still active on BountySource remain valid though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants