Search code examples
iphoneobjective-cxcodechipmunk

Reading cordinates in objective C for Chipmunk


I am working on a game in iPhone for which I use the Chipmunk library to generate the environment. So the issue I am facing is that I am calling the coordinates for the obstruction from a file.

I would like some feed back on what's the best way that I store the coordinates of the obstruction for each level either in the form of an XML or an ordinary text file.


Solution

  • I think the best way is to use a .plist file (which is of course XML) for it and then grab them using NSArray * cArray = [NSArray arrayWithContentsOfFile:plistPath]