I am very near to port the CocosDragon in Coocs2D-X. However, currently there are three issues in cocosbuilder reader that are slowing me down.
Let me know if I can assist you in producing these issues.
1. If a CCLayer read from CCBI then it takes by default the device sizeIn reality it should read the size from the CCBI file. See the attached image. I set the position of each game object element based upon the percentage of the layer size. Since layer size is going to be different for different for Android and iOS device. It is taking default iPhone screen size. The same CCBI file works fine if I use cocos2d-iphone.
2. While reading customMemberVariable the code is keep on crashing if I don’t let the animation of previous CCScene completed.
For example, in CocosDragon game, if I click on Play button in mainMenuScene while it is animating or even clouds animation is once not completed then code crash while loading the GameScene upon reading the first member variable.
IMO, This gives very bad user experience and required immediate fix.
I have attached the stack trace for the second issue.
bool GameScene::onAssignCCBMemberVariable(cocos2d::CCObject * pTarget, cocos2d::CCString * pMemberVariableName, cocos2d::CCNode * pNode)
*CCB_MEMBERVARIABLEASSIGNER_GLUE(this, "levelLayer", CCLayer *, this->levelLayer);
CCB_MEMBERVARIABLEASSIGNER_GLUE(this, "scoreLabel", CCLabelTTF *, this->scoreLabel);
BTW, I already checked by interchanging the lines in above code and it is happening while assigning the first member variable. And this issue is reproducible in both 2.0.3 and 2.0.4 versions.
CCAssert(m_uReference > 0, "reference count should greater than 0"); +// Code crashes at this point by giving EXC_BAD_ACCESS+ --m_uReference;
if (m_uReference == 0)
3. CustomProperty is not supportedIt is already reported here by Zilong. http://www.cocos2d-x.org/boards/18/topics/17554I can manage this by manipulating it in the game code. Though would like to maintain is CCBReader code in future.
Let me know how soon we can solve this or point me right direction to move forward?
Issue_1.png (172.1 KB)
Issue_2.png (186.1 KB)
StackTrace_Issue_2.png (596.7 KB)