to cocos2d-x to cocos2d-x
0.0 0


hi can anybody change this demo project to cocos2d-x
this demo is good sample with box2d .
the box2d version is old but i changed it to new.i have problem to convert this lines:

    AtlasSpriteManager* altSptMgr = (AtlasSpriteManager*)[self getChildByTag:kTagFlipperSpriteManager];
    if (altSptMgr==nil){
        Texture2D* texture = [[TextureMgr sharedTextureMgr] addImage:@"flipper.png"];
        altSptMgr = [AtlasSpriteManager spriteManagerWithTexture:texture];
        [self addChild:altSptMgr z:0 tag:kTagFlipperSpriteManager];

    AtlasSprite* flipperSpt = [AtlasSprite spriteWithRect:CGRectMake(0,0,34,19) spriteManager:altSptMgr];
    [altSptMgr addChild:flipperSpt z:0];


I just downloaded the source from its svn, oh, sorry, it looks like a very very early version of cocos2d-iphone, even earlier than cocos2d-iphone change license to MIT. I’m not familiar with the feature & behavior of AtlasSpriteManager, it’s not existed in cocos2d-iphone 0.99.4 and later version.

Does this code snip just want to insert a new sprite with texture “flipper.png”, and the texture is holden by CCTextureCache which can reused by other sprites?


hi Walzer thanks for your attention
your right but i’m new in cocos2d is it possible you or someone convert it?
i think it’s good sample for other developers as tutorial…


Before someone convert crayonballdemo, I suggest you to read our [[Tutorials]] on converting RayWenderlich’s Cocos2dSimpleGame and first.