Best way to use sprite sheets for animation

Am I missing something or is it only possible to have the sprites in order from 1, 2, 3, etc…for the animations in spritesheets?

For example, use Kenny’s latest platformer enemies spritesheet. notice the animations need to go vertical, but defold only does sequential from left to right. So I can say animate starting at 4 and ending at 9, but I can’t say animate 12, 20, 28, 36. Is this accurate? If so should this be a feature change request or am I silly for thinking we should be able to choose the tiles to animate?

1 Like

He did what? I’m surprised. Why this sudden change? All his old assets have animations ordered left to right.

There’s nothing to do about it in Defold. You need to change the source image or use individual images and create an atlas instead.

1 Like

I asked him on Bluesky: @britzl.bsky.social on Bluesky

1 Like

You can see the images in the sheet. They are vertical aligned. So this is not normal is what you’re saying.

You can download his latest platformer pack here: New Platformer Pack · Kenney

look at the enemies spritesheet. They are vertical aligned.

I suppose there are other tools that can work with both left->right and top->bottom ordered sprites, but Defold can’t.

Yet. I think we sorely need more ways to define an animation from a sprite sheet, using e.g. individual duplicated frames, ranges etc.

9 Likes

Should I put in a request to allow us to do this? It would be a huge quality of life feature to allow me to just set the properties of the spritesheet order to make an animation for me. It will save me from needing to divide the spritesheet and make various animations from it. I could easily just say use cell x, y, x1, y1, x2, y2 etc… for this animation.

I’ll file the request so it can be added if the team agrees.

Note that Kenney also provides individual sprite images in all of his bundles:

1 Like

Possibly also expand atlases so that you can provide an image that has all of the sprites and provide the size of each cell to access them to create the animations. I think both Godot and Unity approach it like this as well as the single images.

2 Likes