I´m creating Groups that contains Sprites and adding bodies with box2D, but when I create many of this my animation gets very slow. How can I handle it?

  • 3
    \$\begingroup\$ You have to provide more specific information about what you are doing. Also, what does "my animation gets very slow" mean? \$\endgroup\$
    – user9790
    Mar 1 '12 at 17:09
  • \$\begingroup\$ I'm creating many Sprites and I add them to my stage, over 100, and the frame rate gets low (the slow animation) any clue ? \$\endgroup\$
    – magorich
    Mar 1 '12 at 19:18
  • \$\begingroup\$ Can you show the code for how you create, store, and update the sprites? \$\endgroup\$ Mar 2 '12 at 2:02

Have a look at this if you're using spritebatch http://code.google.com/p/libgdx/wiki/SpriteBatch#Performance_tuning

And also if your bodies are static terrain and don't animate, then you should be using SpriteCache. Ex. you are building tile based terrain


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.