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

Is it possible to use an animated sprite on a tile within the tileengine? #345

Open
GrimLothar opened this issue Jan 31, 2023 · 2 comments
Labels
feature New feature or enhancement

Comments

@GrimLothar
Copy link

I noticed that Tiled editor does have the option to create animated tiles, but when I create one and use it within the tileengine, it is not animating it

@straker
Copy link
Owner

straker commented Jan 31, 2023

I didn't know Titled had an option for animated tiles. That's pretty cool. Currently Kontra does not support that, but I can look into it.

@straker straker added the feature New feature or enhancement label Jan 31, 2023
@GrimLothar
Copy link
Author

That would be awesome!! Looks like when you create an animated tile, it exports it in the json like this (inside the tilesets object):

 "tilesets":[
        {
         "columns":8,
         "firstgid":1,
         "image":"tilesheet.png",
         "imageheight":256,
         "imagewidth":256,
         "margin":0,
         "name":"tilesheet",
         "spacing":0,
         "tilecount":64,
         "tileheight":32,
         "tiles":[
                {
                 "animation":[
                        {
                         "duration":300,
                         "tileid":9
                        }, 
                        {
                         "duration":300,
                         "tileid":17
                        }],
                 "id":33
                }],
         "tilewidth":32
        }],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants