2D Sprite Animation

The title says it all. How should I change the sprite for animation? I know I must use a quad. I have experimented a little and found out that if I pre-load materials (each with its own different animation frame) and assign the material which is needed, it could work well (it doesn’t take a lot of FPS). Another thing I thought of is to pre-load textures at the start of the game, then assign them to the diffuse etc… of one material when needed.

What would you recommend?


Is it more efficient? Since I have no experience with Shaders, I prefer to use what I know for now. (And it’s not finished either, from what I understood).

@memonick said:
Is it more efficient?

More efficient than what?

I just told you what i would recommend, for making sprites. Also from my understanding you don't need to know shaders to use his stuff, but you would if you do it all by yourself

@memonick said:
I prefer to use what I know for now.

That's how you never learn.

I meant to ask whether it is more efficient than changing materials/textures.

@nehon said:
That's how you never learn.

It's just that I'm going through some tough exams, and I want to lay low for a little while.

Well, shaders, which SE uses are usually more efficient than calculating on processor, but they’re not supported by all GPUs. If you have access to computer with Intel GPU, try checking your game on that. If performance is good enough (more than 40fps), let it be.