Reputation: 1322
I'm creating a simple puzzle game that uses Cocos2d and Box2d but I'm struggling to find any documentation on how to organise levels.
The game is similar to Cut the Rope in structure, it has multiple fixed size levels with changing Box2d assets.
Currently my mainGame.m file contains my HUD and methods for creating obstacles. Would the best answer be to call some sort of .plist file for each level that lists the assets to be created, and their respective position, then use a for loop to reference the method in the mainGame.m file?
Or could I create a level class on a seperate xxxxxx.m file that references the methods in my mainGame.m?
I apologise if this is vague/hard to understand, I'm very confused at the moment and not sure how to move forward :/
Upvotes: 0
Views: 3312
Reputation: 10631
well... the easiest way will be to use LevelSVG so that you can draw the levels in a SVG graphics editor and import them. If you can pay little price then LevelSVG is great.
Upvotes: 1
Reputation: 7625
A few possibilities come to mind...
As painful as it might be I would not get into the fine details of storing metadata for your level in a plist file. Hard code values for any static placement of UI or other components you need to do. Likely your time is better spent refining the game itself. Hopefully some of those ideas are useful to you. Certainly let me know if anything doesn't make sense or if you want me to go in depth into one of those items a bit more.
Upvotes: 3