Open Remi-Godin opened 1 week ago
Hey bossman, I'd love to give this a shot.
**edit: do we wait for you to assign or do we self-assign?
You got it :sunglasses:
Thanks! I'm scared and excited. :D
Removed myself as assignee on the issue...sorry everyone, I am out of my depth on this one. I'll absolutely hop on another issue in the future but I just need to learn more about Rust/Bevy first.
Create a Bevy plugin to facilitate handling animations from sprite sheets. Most sprite sheets contain multiple animations, and we should be able to play each of them whenever we want, and even mix and match frames to create new ones if possible. Once an animation is defined, it should be saved in a collection of sort that we can then go through and select which one to play at any given time.
See this example from the official Bevy examples to see how sprite animation works. In the example, you can see that the texture atlas (or sprite sheet) is broken down into a
TextureAtlasLayout
, which is saved in the asset server. On the character, there is aTextureAtlas
component that references thatTextureAtlasLayout
. In theanimate_sprite
system, we query theTextureAtlas
component and the index is changed every time the timer has completed a cycle.The goal here would be to have a component we can add to our sprites which will play the selected animation continuously, at the desired speed. Animation selection would be driven by external events outside this plugin.
Requirements:
Stretch goals: