Hi,
I have a question, i’am developing a game for the first time with cocos2d-x.
Everything goes very well, but one question: What’s the best way to handle
different levels, i mean how to load different levels. So not for every level a special class file…
Regards,
Gerrit-Jan Jansen
What you can do is either create a custom parser class to load a file containing your levels and information, your game will handle the rest or you can use cocos builder or studio to do that for you.
A game am working on, I have used Tiled tmx files to create my levels and then parse object properties for custom levels etc.
Good luck.
In my game I use TMX files (www.mapeditor.org + CCTMXTiledMap) to store each level.
That way the game logic can figure out the filename as a string and then just say
LoadLevel("FirstLevel.tmx")
+1 @Jamal’s answer, same here
Cory Trese wrote:
In my game I use TMX files (www.mapeditor.org + CCTMXTiledMap) to store each level.
>
That way the game logic can figure out the filename as a string and then just say
>
[…]
>
+1 @Jamal’s answer, same here
Thanks for your answer. I think thats indeed the most clean way to load different levels.
Thanks.