Can you use sprite sheets for animation?

I have some sprite sheets that i made for animating the player. But the tutorial that i found
by games from scratch uses individual png’s. it would be a huge pain to separate them into individual sprites. Does anyone know if you can animate with sprite sheets in Defold?

(games from scratch website. highly suggest using his tutorials if you’re new to game development)

Link to his Defold tutorials for those interested:

1 Like

Yes, as long as the sprites are the same size, you can create a “.tilesource”, and use that.

3 Likes

Manual: Defold tile source manual

3 Likes

Also this might be helpful:

If you really have your sprites in spritesheets you’ll probably have a plug’n’play solution already, just replace atlases with tilesources for your sprites :wink:

Create tilesources out of your spritesheets, prepare there your animations and name them. Then for your sprites instead of using atlases, use tilesources and set a default animation :wink:
If you want to play different animation then - use sprite.play_flipbook with a name of your animations from the tilesource. If you’ll have still some questions let us know :blush:

2 Likes

Thank you all so much for your responses. They were very helpful, i figured i might be able to do something with atlases, but i didn’t have to script it myself. I was hoping there might be some sort of inbuilt feature that could handle sprite sheets. Thank you! :smiley:

1 Like