Cocos2d-x Quirks

Hi folks, I’m new to the forums, but I’ve been working with cocos2d-x for about 3 months now. I just posted a summary of cocos2d-x quirks to my blog. It’s pretty basic stuff, and I found a lot of the answers here or on cocos2d-iphone.org (I added links wherever possible), but it seemed useful to gather it all in one place. And I think it might be helpful to newcomers to cocos2d-x.

I welcome and would greatly appreciate feedback on my approach. I am always open to learning about better ways to solve problems! :slight_smile:

Thanks for the info Mike and welcome to the forums. I’ve also ran into my fair share of little quirks, but overall I’m a big fan of Cocos2d.

I noticed that you are having some performance problems on iPad1. Here are a couple of suggestions. Use CCSpriteBatchNode for rendering to reduce draw calls. Compile to ARM instead of THUMB. If using a physics engine decrease the steps to 30 per second. Use a code profiler to find bottlenecks.

Visual Studio 2012 Premium has a nice profiler built-in and I’ve noticed that usually Cocos2d only takes a considerable amount of processing when I’m rendering a huge amount of sprites. I’m really not sure how well XCode’s profiler works though.

Hi Kevin, thanks for the suggestions on performance. I’ve just done some investigation and it turns out most of the problem is due to some expensive fragment shaders. It also looks like standard alpha blending is pretty expensive, which surprises me. I’ll start with rendering the expensive stuff to textures when possible and see if that’s good enough.