Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
3  
You have to provide more specific information about what you are doing. Also, what does "my animation gets very slow" mean? –  Jaakko Lipsanen Mar 1 '12 at 17:09
    
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 ? –  magorich Mar 1 '12 at 19:18
    
Can you show the code for how you create, store, and update the sprites? –  Steve Blackwell Mar 2 '12 at 2:02
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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