I’m continuing my prototype using cocos2d-x airplay (cocos2d-0.99.5-x-0.8.2) and I’m currently trying to port the loading of the data from the excellent PhysicsEditor to make work with Box2D even easier.
but it fails in CCFileUtils_airplay.cpp - endElement CCAssert(m_bInArray, "The plist file is wrong!"); because the data from PhysicsEditor has an array of arrays in it but the plist parsing uses a single m_pArray variable and doesn’t stack them like the dict’s.
I’m facing the same problem. As a cocos2d-iPhone and iOS deveoper before, I expected the CCFileUtils::dictionaryWithContentsOfFile(const char *) func behaves the same as NSDictionary’s dictionaryWithContentsOfFile method in iOS platform.
It’s a pity that coco2s-x’s plist parsing cannot do this. So my suggestion is:
If you need to make a series of complicated webservice, you have to implemented the parsing job yourself using libxml2.
If you just want to load some configuration files, consider changing the file format, otherwise you have to do the parsing job.
I have requested to @walzer informally in our QQ group, but it seams to be not in the recent roadmap.
If you can’t change the plist configuration tool, you can convert the plist format to csv(or other formats you like) by adding a RunScript build phase in Xcode.
I think a simple python or bash script could handle it. (I recommend python plistlib)