Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimatedSprite spritesheet support #6367

Closed
robertdhernandez opened this issue Sep 2, 2016 · 8 comments
Closed

AnimatedSprite spritesheet support #6367

robertdhernandez opened this issue Sep 2, 2016 · 8 comments

Comments

@robertdhernandez
Copy link
Contributor

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).

@razcore-rad
Copy link
Contributor

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?

@eon-s
Copy link
Contributor

eon-s commented Sep 18, 2016

@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.

@reduz
Copy link
Member

reduz commented Sep 18, 2016

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 notifications@github.com 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
#6367 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z24pCK7oMzc1GEMKhnUKdhSdVNk2qks5qrT-xgaJpZM4JzbQI
.

@razcore-rad
Copy link
Contributor

razcore-rad commented Sep 18, 2016

@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...

@ghost
Copy link

ghost commented Apr 6, 2018

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

@eon-s
Copy link
Contributor

eon-s commented Apr 6, 2018

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.

@aedart
Copy link

aedart commented Jan 13, 2019

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.

@KoBeWi
Copy link
Member

KoBeWi commented May 13, 2019

Fixed in 3f76d2c

@akien-mga akien-mga added this to the 3.2 milestone May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants