Map like Candy Crush using Cocos2d-x + Marmalade

Hello everybody, I have developed a 2D game using Cocos2d-x and Marmalade.

I would like to know what would it be the “better solution”, considering performances, memory etc, to create a Scene before playing the game where I can show to the user a Map like that one used in Candy Crush Game, then:

zooamble
scrollable
clickable buttons (levels) at predefined coords etc
character moving between buttons (level)
Many thanks in advance

Sergio

I would create a large CCLayer and then add the background image on it, preferably chopped up into segments to avoid freezing.
Another solution would be to use a TMX Tile Map to load the whole layer.

Thanks Lance for the reply.

as the game is only in landscape mode, I m thinking to simply use a vertical scrollview to avoid memory problems.

I m gonna let you know.

Sergio

Hi Lance Gray, I am using a vertical scroller at the moment.

I have divided my map in segments. 1 for screen size height, then I have this:

CCSprite 0 added in CCLayer 0
CCSprite 1 added in CCLayer 1
CCSprite 2 added in CCLayer 2

Array with all CCLayers sent to my vertical scrollview

The main problem at the moment is how to put buttons on this layer in order to have the same position/dimension for all resolutions. it’s very hard I think. what do you think?