I’m using a large atlas for my game that contains many assets—some are single bitmaps, while others are frames for sprites.
Take a look at the attached sample:
- A large atlas
- A sprite with 9 frames, each sized 1/8 × 1/8 along both axes
Currently, I’m doing this:
const anims = {
'a': { frames: [ 45, 46, 47, 53, 54, 55, 61, 62, 63],
ordered: true }
}
and run it like so:
sprite.run({label: 'a', time: 0.25, loop: true});
However, I’m encountering a couple of issues:
- I want the animation to start on a random frame: for example, frame 5 out of the 9 total frames (it changes from one instance to another), but I can’t figure out how to do that...
- It seems like the last frame has a different playtime compared to the others, resulting in a less smooth animation. Is that possible?