开发者

Is there anyway to develop a game of maze without using .tmx file in cocos 2d

I am new in cocos2d developement.I have to develop a game of maze by using tile map.The game is all of containing a fish which has to be moved through the maze and the maze will also contain some enemy fish from which the Hero fish has to escape.There are 15 levels in the game an开发者_如何转开发d therefore for completion of each maze with the tile map editor takes much time.So is there any way to develop a game without using tile map editor in cocos2d.


Of course there are ways to develop such games without tmx tiles.

For instance, you could draw the maze yourself in an image editing program, then also make a "collision map" of the maze (i.e. all the areas that the player can't cross). Then, at runtime, simply check if the player is touching a collision area by reading the pixel from the matching "collision map", based on the location of the player.

The question is, why would you want this? Isn't it easier to have a TMX file that is tiled to make a maze game? Tiles are a great way to structure a maze game, as it allows you to implement path-finding algorithms fast and easy.

Also, using the level editor would make it easier for you to add new levels later. If you have to draw new levels completely from scratch, I presume your game will take more time to expand.

Just my thought. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜