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 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?

share|improve this question
Either, you write a cutom exporter for the level editor of your choice, or you write an importer for your program which reads the level generated with the level editor and parses it into the format you need. – sarahm Aug 4 '12 at 17:31
^ Importer is far easier. – Phill.Zitt Aug 4 '12 at 22:01
up vote 2 down vote accepted

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.

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.