Hello Guest

Author Topic: Number of frames and CPU charge  (Read 4062 times)

vinnie035

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Number of frames and CPU charge
« 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...).
« Last Edit: November 09, 2012, 11:15:03 am by vinnie035 »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Number of frames and CPU charge
« Reply #1 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.