fishfolk / punchy

A 2.5D side-scroller beatemup, made in Bevy

Home Page:https://fishfolk.github.io/punchy/player/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-contiguous Animation Clip/Playback

odecay opened this issue · 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 #190 (comment)

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.

Array of frames could work as well 👍