Hello everyone! I’m a bit confused, because i don’t know if these videos are teaching me right or wrong stuff, I heard that it’s better to use Sprite2Ds than an AnimatedSprite2D for characters, If that’s true… then what is right?, i’ve seen quite a lot of videos using AnimatedSprite2D, what’s wrong with it? I’m also decently new to Godot… So any… Tips? Or something?
Sorry for not being too clear, and sorry if this post annoys you somehow (and sorry for talking alot).
An AnimatedSprite 2D has the benefit of working with multiple image file and does not need to rely on singular spritesheet.
There are performance difference and such but honestly those are pretty negligible.
Personally though, I use Sprite2d for simple stuff like bullets that does not need alot of different animations but AnimatedSprite2D and Animation Player for complex stuff like characters. Like @Moreus said, just choose the method with the best workflow for you.
the same can be accomplished with an AnimationPlayer through multiple Sprite2Ds, and have more control like moving the position. not that we would want each frame on a different file, it is better if they are packed, not just for performance but so we don’t have to deal with individual files and accidentally misplace one.
another problem of AnimatedSprite2D is that when using regions of a spritesheet, there is no way to go back and edit it. you have to do it all over again.
moving the position is specially important when flipping the sprite, because when working with different sized sprites, they are not always symetrical or aligned with the previous frame.
with AnimationPlayer you get additional advantages like being able to rotate and scale the sprite, or use multiple sprites combined to form a character, this last has been a technique used since the 80s, in games like castlevania.
all of these things help the animator and performance because not as many sprites are needed.
I find AnimatedSprite2D too simple for advanced users and too difficult for beginners.
because of the way they work, you need to code a state machine just to keep track of the animation that is currently playing, and they have limitations with what you can do.
I recommend using them for simple things like bullets that need to loop a single animation and maybe explode, or a door that is closed and then opened and then closed again, or a chest, or an explosion. things with no more than 1 or 2 animations, maybe 3, maybe 4. but not for characters.
an AnimationPlayer can animate pretty much anything, position, rotation, scale, color, flip, particle effects, sounds, properties, variables in the script, methods.
it can also be combined with an AnimationTree to manage the states or combine multiple animations, and all of this is not just more powerful, it tends to be easier to do, even if there are more options.
a video tends to be concerned with meeting a certain time frame and being fun, and not with teaching the best practices. they are still useful to get familiar with the engine, but are not a law, more like a guide.
good tutorials go into detail, and detail can take an hour or more, or be boring for the casual watcher, so hot tutorials tend to be short and have few steps. some short tutorials are very good, don’t get me wrong, and there are bad long tutorials, but one must be critical of what one is watching. asking questions is one very good way to learn other points of view.