2D Toolkit Forum

2D Toolkit => Support => Topic started by: vinnie035 on November 09, 2012, 11:07:33 am

Title: Number of frames and CPU charge
Post by: vinnie035 on November 09, 2012, 11:07:33 am
Hey,

I use 2D Toolkit intensively in my game project and I'm very happy with this tool. So, I'd like to thank you for your work.
Then, my questions...

I'd like to know if the number of frames used in an animation has an impact on the cpu charge.
1- Will 100 simultaneously active sprites with 24 frames be more heavy on the CPU than the same sprites with only 5 frames for the same animation?
2- What in your opinion is the best strategy to display sprites only when necessary (when they're inside the camera bounds)?

And finally, that leads me to a feature request: I'd like to have an option on tk2dAnimatedSprite to choose between several culling types (Always Animate, Based On Renderers, Based On User Bounds...).
Title: Re: Number of frames and CPU charge
Post by: unikronsoftware on November 09, 2012, 06:25:24 pm
1. Shouldn't change anything.
2. OnBecameVisible and OnBecameInvisible should work well - it should be easy to hook up the animated sprite update to that, and only change the current sprite when its visible.

Something like that will be in 2D Toolkit 2.0.