This project is read-only.

Performance tips for Android?

Topics: Android
Mar 25, 2014 at 5:23 PM
I recently released my cocos2d game on iOS. I was very happy with the performance, never seeing a drop in FPS. I just finished porting my code for Android and when I test it on a real device, it runs correctly but I see frame rate drops at times. I was wondering if you can recommend any performance tips I can take to prevent this? I would profile my code, but I'm using Xamarin and it looks like they only allow business users to profile using their IDE. Here are somethings I'm already trying:

-Pool my sprites during load
-re-use sprites by setting them to invisible then visible when needed, rather than creating/addchild/removechild

One thing to note, I'm using box2d to handle my Physics, I'm not too sure if I possibly need to optimize there, but my physics world isn't too complicated.
Mar 25, 2014 at 5:45 PM
make sure you are using sprite sheets. many sprites that have separate textures spells disaster for performance.
Mar 25, 2014 at 6:04 PM
Thanks. I'm using sprite sheets already. Any other suggestions I could look into?
Mar 25, 2014 at 6:23 PM
depends on the nature of the performance problem. Describe the problem better, send a link to your ios game, record a video, .... something more so we can get some context about the actual performance problem.