Efficient animation in 2D?

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

I have noticed there are many ways of animating. One of the most obvious ones (to me) is the option of having a single image file with multiple animation sprites, or multiple files each containing one sprite per animation frame.

Which option is most efficient? I personally would like to use a single image instead of multiple; but if using multiple images is more efficient; well - I would go with the most efficient method.

I am still new to animation so any additional tips are welcome :slight_smile:

:bust_in_silhouette: Reply From: Hinsbart

I don’t have benchmarks for this, but I think that using a single spritesheet for animation is more performant, as texture switches are kinda expensive in OpenGL iirc.

However, Godot provides the possibility to automatically pack all your images into TextureAtlases during the export process. So I’d say just use the method you’re most comfortable with, in the end it will be same :slight_smile:

Ah, neat. Not familiar with TextureAtlases; but at least that way I wont have to worry about how I setup my animations :slight_smile:

Tybobobo | 2016-03-05 18:18