Hi,
I am using cocos2d-2.0-x-2.0.4 for my game.
Each level has background scrolling and has around 450 objects(sprites) in some levels to draw.
So, that levels are too slow.
Do have any option to solve this slowness issue in Cocos2d-X?, like only draw sprites showing in visible area… etc
Currently I am just adding all sprites like below:
…….
gameSceneMain = CCScene::node();
for(int i=0;i<450;i++) // just for understanding
{
CCSprite* objSprite; // sprite to add into the level
//initialize objSprite
gameSceneMain~~>addchild;
}
this~~>addchild(gameSceneMain);
………
in update, x and y map value(for scroll) will be added with the position of each sprites