Questions

Hi all,

I am currently half way through a large game that has over a thousand images and due to finish december to february 2013. Basically the framework I am using at the moment is great for Android and Html5 but looking at other frameworks too for a future port to IOS for my game. So may well be learning this framework in some months from now.

Some questions please: How well can it move say 1000 sprites of 32 by 32 pixels each smoothly given simple movment logic on a dual core galaxy s2 or similar dual core phone? i know that is a subjective question but at least some indication if possible of sprite performace on this system.
Is it easy to install?
Can it load and unload images easily as my game has many
hundreds of images and i need functions to unload ones not in use and reload them when needed without memory leaks.

Sorry for response so late.
# You can run TestCpp -> Performance Test, and add the number of sprites and see if FPS fit your requirement on Galaxy S2. AFAIK, 1000 sprites using CCSpriteBatchNode works very well.
# Cocos2d-x is very easy to install, it’s only a framework. But the android ndk + sdk environment installation is a bit tricky for beginners, especially on windows. I can finish android sdk + ndk installation in 30 minutes on mac osx, so it depends on your experiences with android
# Please refer to CCTextureCache::removeUnusedTextures(). Don’t worry about the power of cocos2d, it has been proved by lots of top grossing games.

Zhe Wang wrote:

Sorry for response so late.
# You can run TestCpp > Performance Test, and add the number of sprites and see if FPS fit your requirement on Galaxy S2. AFAIK, 1000 sprites using CCSpriteBatchNode works very well.
# Cocos2d-x is very easy to install, it’s only a framework. But the android ndk + sdk environment installation is a bit tricky for beginners, especially on windows. I can finish android sdk + ndk installation in 30 minutes on mac osx, so it depends on your experiences with android
# Please refer to CCTextureCache::removeUnusedTextures(). Don’t worry about the power of cocos2d, it has been proved by lots of top grossing games.
I’ve tried the CCSpriteBatchNode, but it slows to a crawl with just 2000 sprites. Performance in terms of FPS is exactly identical to just using standard CCSprites. Not sure if this is because there isn’t any advantage to the batching, or if I’m calling it incorrectly. Sprites aren’t large so it isn’t fillrate. Here is the code I’m using:
//*************************************************
//METHOD 1: STANDARD SPRITE CREATION
for
{
for
{
//Loop create 20 x 100 sprites, add them to scene.
CCSprite* character_sprite = CCSprite::create;
character_sprite
>setPosition);
this~~>addChild;
}
}
//*************************************************
//METHOD 2: BATCH NODE SPRITES
//Initialise texture and batch
CCTexture2D *texture = CCTextureCache::sharedTextureCache~~>addImage;
CCSpriteBatchNode batch = cocos2d::CCSpriteBatchNode::createWithTexture;
//
for
{
for
{
//Loop create 20 x 100 sprites, add them to CCSpriteBatchNode.
cocos2d::CCSprite
character_sprite = cocos2d::CCSprite::createWithTexture);
character_sprite~~>setPosition);
batch~~>addChild(character_sprite);
}
}
this->addChild(batch);