Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I this is the first time I am developing for BB10 OS using cocos2dx.

I need to read key value pair in Cocos2Dx.

eg: Skill= 5
Power= Awesome

The target is Blackberry 10OS and using QNX Momentics for development. Is there a library for this? Or as an alternate approach, if this can be a stored in a lua file, then how to parse the lua file to retrive these values, based on keys?

share|improve this question

cocos2d-x can parse .plist and store it in a CCDictionary. I suggest you use a plist rather than a normal txt file.

If you are using XCode, you can create from there.

To load the plist and store it in the dictionary, you can do this:

const char *plistPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("myplist.plist");
CCDictionary *myKeyValuePairDictionary = CCDictionary::createWithContentsOfFileThreadSafe(pszPath);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.