Animated Sprite or Spritesheet

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FateAce
:warning: Old Version Published before Godot 3 was released.

In godot version 2.1.1, which has better performance, Animated sprites using 50 images or a spritesheet with 50 frames on it using the animation player.

The reason I ask is my project is using large images in it. Each frame per character is going to be a 512x512 image at LEAST. It would be beneficial for me to use Animated sprites due to the large size, but when I last checked, animated sprites had bad performance, so I need to know if thats changed.

Using AnimatedSprite or AnimationPlayer should not make a difference when doing SpriteSheet animation. What problem did you have? 512x512 is large for something animated frame by frame (and you said AT LEAST). How many frames do you have?

Zylann | 2017-01-03 17:57

Animated Sprite Sheets are far better. The GPU only has to load 1 texture, not multiple. The only reason animatedsprite node thing is there for the lazy devs who never made a spritesheet.

wombatTurkey | 2017-01-04 12:06

After doing a bit of math, I estimate I’ll need at least 42 frames per character, across all their animations. But I will likely have more than that per character. And the problem I have is that trying to fit all those frames into one image will likely slow my computer down trying to edit it (Let alone use it in the game).

FateAce | 2017-01-04 12:25

@wombatTurkey: you can use AtlasTexture and still have one image though. Also ImageGroups can make atlases for you behind the scenes http://docs.godotengine.org/en/latest/tutorials/asset_pipeline/exporting_images.html#image-group-export-options

@FateAce: you can fit up to 64 frames of 512x512 in a 4096x4096 texture. Beyond that, some platforms may or may not accept that because it’s too big (some even limit to 2048x2048 according to the doc, must be mobiles). You should consider either aiming for a lower resolution (are these really going to be shown that big on screen anyways?), use multiple images and Image Groups, or find a better design for the biggest ones like partially-animated parts or skeletal animation. All this, IF graphics are a bottleneck for the platform you target.

Zylann | 2017-01-04 13:52

@Zylann The guy say he has 50 frames of atleast 512 pixels wide. Loading in 1 large spritesheet is much better than loading 50 at runtime.

wombatTurkey | 2017-01-04 21:52

@wombatTurkey Yes, he can, but to an extent. If it just works for the platform to export to, then it should be fine.

Zylann | 2017-01-05 00:33