Different tags can share a same frame?

#1

Hi.
I drew 3 images, A, B and C.

One animation tag has frame-A and B,
Can other tags have A and C?
1
I referred this, unfortunately I couldn’t achieve.

Sprite sheet gets extra frame if export.

Pardon my broken English, thanks.

0 Likes

#2

Different tags can share a frame but you cannot have tags skip frames, the frames within a tag must be consecutive, as far as I can tell (I vaguely remember something about this in an upcoming update, so maybe that will change in the future). So, currently you can have tags for ABC, AB and BC, but not for AC since that would require skipping a frame.

You may be able to get around the limitation contiguous frames in tags by playing with your tag order and animation direction. In your example, you could reorder the frames so that they’re BAC, then the tags could be Punch BA (with the animation direction set to Reverse), and Kick AC (animation direction Forward).
Alternatively, you could change your animation state machine to use the middle pose as a neutral state between other animations, so you would not need to include the neutral pose in other animations.

2 Likes

#3

Thanks!
I succeeded it using the ‘B-A-C’ workaround.

I couldn’t really understand the second method.
I make another frame-A(neutral pose), but I failed to export the sprite sheet excluding it.
I can export tags one by one.

0 Likes

#4

The second method is outside of Aseprite, in your game. All I meant is that you could set up your game to not need the neutral pose (A) to exist in all the different animations, it could be displayed between other actions without being a part of their animations. So when the player isn’t doing anything, you show A. When they’re punching, you show B. When they’re kicking, you show C. When they’re done punching or kicking, you return to the neutral pose A.

Do not include duplicate frames in your animations if you do not want duplicate frames in your spritesheets. The BAC workaround allows you to avoid duplicating frames for this specific scenario. If you have more animations, it probably won’t work, and you’d need to either have duplicate frames (and export them), or you’d need to carefully consider why you have these repeating poses in the first place, as chances are you don’t actually need them and just need to rethink your animation structure in your game/engine a little.

One more work-around would be to modify the exported animations either within your game, or prior to importing them into your game. For example, in my game, I have a certain animation that repeats a 3-frame animation a few times, and then transitions to another animation. Aseprite has no “loop N times” feature, and I didn’t want to repeat the frames a bunch of times, so I just tweaked the animation as read by the engine by hand so that instead of being frames [3,4,5], it’s frames [3,4,5,3,4,5,3,4,5,3,4,5,3,4,5]. The spritesheet is the same, the frames are just shown multiple times.
The exact way to do this would depend on your game’s animation system. In mine, I have a JSON file defining all the animations as sequences of frames (generated automatically from the JSON exported by Aseprite), so I can just hand-tweak that in a text editor.

0 Likes

#5

Oh, I see!!
Adjusting the pixel arts or the game programs… I think you’re right.

Thanks a lot!

0 Likes