Animated Sprites 2D vs Sprite + Animation Player
Asked Answered
S

3

0

In Godot 4, Animated Sprite got much more flexible than in 3, from what I have tried. Both methods work well for sprite sheets, albeit a bit harder to template for Animated Sprite.
But still, in Godot 4, is there a good reasoning which one method is preferred for each one?
Is there extra optimization for Animated Sprite 2D?

Stolid answered 23/6, 2023 at 18:31 Comment(0)
R
0

I think it boils down to personal preference, and more importantly specific use case.
I don't know whether AnimatedSprite2D is more optimized.
But If you are comfortable with AnimatedSprite, and you don't need any of the other AnimationPlayer superpowers, just use that.
But I really like the AnimationPlayer. It can simply do more than just animating sprites.
Any property, as far as I know, can be animated using AnimationPlayer. Position, Scale, Rotation Color, Visibility, other booleans, and setting different textures, too.
And that's only scratching the surface.
Heck, you can even call methods !! Which brings more power and depth for the tool.

Rothwell answered 23/6, 2023 at 18:50 Comment(0)
C
0

I think from an internals perspective, an AnimatedSprite might be slightly faster than an AnimationPlayer, but personally I’d recommend using an AnimationPlayer because it will give you a LOT more flexibility and expand ability should you need it further in development.

One area I can think of where I’d recommend an AnimatedSprite over an AnimationPlayer is when you are using multiple sprite files (not a sprite sheet, one image per frame), as the workflow is a little easier with an AnimatedSprite last I knew. But if you’ve using a sprite sheet, I’d encourage you to use an AnimationPlayer over an AnimatedSprite if you can.

Carob answered 23/6, 2023 at 19:37 Comment(0)
M
0

well im working at my game around 3.5 years so far, and i can say animationplayer node is strong.
especially "call methot track" thing its so nice, you can call a function from script at any time with timeline. when working with sounds its become handy a lot.

Mesoglea answered 24/6, 2023 at 13:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.