I have a game, breakout clone. It has a Block class that contains CCSprite as a property. Usually I made levels by manually setting those blocks to positions. Here comes the question, how do I use generic level editors with my custom code? All editors work with CCSprites and not my class. How can I overcome that?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
As sarahm said in a comment, you need to either import the maps from files saved by the level editor or write an exporter for it(if it supports plugins/extensions like this). Since they're generic and as such meant to be used by more than just one game, the format is probably quite simple(and almost certainly documented somewhere, just search a bit) so writing an importer is most likely the better choice. You will probably need to read type/position/any other properties you're interested in and use them to build your map(place objects, set tile types, etc.). You could always also convert said level files to your own format, but I doubt there is much reason to do this. |
|||
|
|