punchy icon indicating copy to clipboard operation
punchy copied to clipboard

Non-contiguous Animation Clip/Playback

Open odecay opened this issue 2 years ago • 2 comments

Does it make sense to implement clips/animations which play a non-contiguous array of frame indexes? I had a usecase for it before when I was adding a waiting state and it didn't really match any of the available animation frames, but I'm not sure if that would be a good design. It would let us piece together frames from a spritesheet to make "ad-hoc" animations of the correct length, or skip frames in the middle of an animation if we needed to.

Unsure overall if this is a good idea or if there are better ways to attain more flexibility in animation playback/definitions via code/resources.

Originally posted by @odecay in https://github.com/fishfight/punchy/pull/190#discussion_r934852159

odecay avatar Aug 01 '22 19:08 odecay

It could make sense. It would essentially be an array of ranges, which might not be bad.

Some of the exact details of the syntax become less important with an editor, too, so if it was a useful feature and we could make a good interface for it, it seems like it might be good to include.

Another possibility is to just use an array of frames, which would be ultimate flexibility with a lot more typing for otherwise simple cases.

zicklag avatar Aug 01 '22 19:08 zicklag

Array of frames could work as well :+1:

odecay avatar Aug 01 '22 19:08 odecay