- Home /
Rendering an animated sprite multiple times
Mostly for performance reasons, I'm looking for a way to render multiple of the same animated sprite while every sprite is showing the same animation frame and I'd think if I only ran the animation once it would be a lot more performant than having each sprite running it's own animation (making a Guitar Hero type game, can potentially have over a hundred notes at once).
So is there any way of just running the animation once and rendering it multiple times? Or would this require my own animation code?
$$anonymous$$anaged to figure something out, just ended up keeping track of the animation frame index and storing all the sprites in an array.
Answer by lgarczyn · Mar 14, 2017 at 06:27 PM
The only thing more optimized that you're gonna get is to make every sprite part of the same mesh, and use a shader to change the texture coordinates to the right frame. That would be very optimized, and allow millions of sprites.
But for anything less than 10000, just use the normal system.
Thanks for the reply, but I already figured out what'll hopefully work best. Ins$$anonymous$$d of having 30+ different animations on potentially a couple hundred sprites, I just keep track of my own animation frame index and then just pull the sprites from an array. Plus this helps keep everything on the same frame of animation (which is what I need), all that's different between them are colors.
Your answer
Follow this Question
Related Questions
SpriteManager 2 1 Answer
How to do you import Spriter animations into Unity? 1 Answer
sprite animation not playings 0 Answers
How to animate a sprite mask? 0 Answers
Sprite animation 2 Answers