Godot: AnimatedSprite spritesheet support

Created on 2 Sep 2016  Â·  8Comments  Â·  Source: godotengine/godot

This might be a duplicate of #344, but that issue is over 2 years old so I thought it'd be better to make a new one instead to bring fresh discussion.


It's inconsistent for Sprite to handle spritesheets and AnimatedSprite to handle multiple image sprites. Sprite should be just a simple Node that renders a 2D image with a definable sub region. It shouldn't also do sprite animations -- that's what AnimatedSprite is for: a sprite that has multiple frames defined by a SpriteFrame (or multiple images) and animates it very simply. If users want more customized sprite animations, they can use an AnimationPlayer; otherwise the AnimatedSprite handles majority of animated sprite cases in an easy format.

The other issue with Sprite doing animations, is that animating them requires an AnimationPlayer, which becomes really tedious to adjust the Sprite:frame for each key for each animation (unless I'm unaware of a better method).

feature proposal core

Most helpful comment

@eon-s I digress, it isn't as easy when you want to play with speed. You have to work with the less intuitive Speed option of AnimationPlayer and/or scale the keyframes, both options meaning you have to do maths so I personally at least prefer the easier AnimatedSprite option. It would be great if either AnimatedSprite get the option of working with sprite sheets or have the AnimationPlayer work in FPS as well, not just time in seconds. If AnimationPlayer would receive FPS option it would probably mean the end of AnimatedSprite, but oh well...

All 8 comments

Yes, I also feel that this is a bit strange, and somewhat inconsistent if you think about the naming, Sprite vs AnimatedSprite, why is Sprite capable and AnimatedSprite not?

@robertdhernandez is easy to animate using frames and AnimationPlayer (just +1 each frame).

But is true of the inconsistency, it should support spritesheets too.
Maybe AnimatedSprite is too old, perhaps not even needed with the new plugins around.

You can use AtlasTexture, which works similar to a SpriteSheet, but I think
there is no easy tool to do this.

On Sun, Sep 18, 2016 at 10:42 AM, eon-s [email protected] wrote:

@robertdhernandez https://github.com/robertdhernandez is easy to
animate using frames and AnimationPlayer (just +1 each frame).

But is true of the inconsistency, it should support spritesheets too.
Maybe AnimatedSprite is too old, perhaps not even needed with the new
plugins around.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/6367#issuecomment-247848390,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z24pCK7oMzc1GEMKhnUKdhSdVNk2qks5qrT-xgaJpZM4JzbQI
.

@eon-s I digress, it isn't as easy when you want to play with speed. You have to work with the less intuitive Speed option of AnimationPlayer and/or scale the keyframes, both options meaning you have to do maths so I personally at least prefer the easier AnimatedSprite option. It would be great if either AnimatedSprite get the option of working with sprite sheets or have the AnimationPlayer work in FPS as well, not just time in seconds. If AnimationPlayer would receive FPS option it would probably mean the end of AnimatedSprite, but oh well...

Still reproducible/relevant in 3.1 master 9ad1800 : there's no easy way to use spritesheet with animatedsprite

I wonder if may be better to add separate image support (and texture track preview if possible) for use with AnimationPlayer and start deprecating AnimatedSprite instead.

GoDot has some really powerful features, yet the 2D animation part is somewhat troublesome. I too would like an "easier / consistent" way to use both individual images (e.g. via the AnimatedSprite) and sprite-sheets / atlas, when animating. It's not that the current version doesn't work; it's doable once you gotten the hang it. Yet, when working with pre-made sprite-sheets, it's just more demanding to setup your animations, in comparison to other game-engines (or editors).

As @eon-s already wrote, it might be a better solution to simply scratch AnimatedSprite, and allow Animation Player to offer sprite-sheet / atlas support. Furthermore, if the animation player also could allow setting frame-per-second directly, then this could be really great.

Fixed in 3f76d2c2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

testman42 picture testman42  Â·  3Comments

nunodonato picture nunodonato  Â·  3Comments

gonzo191 picture gonzo191  Â·  3Comments

Spooner picture Spooner  Â·  3Comments

n-pigeon picture n-pigeon  Â·  3Comments