Hi,
I am new to IPhone programming and cocos2d. I would need your help to get on the good track to create the first application.
I am trying to create a jigsaw puzzle application. Can you give me some advice to choose the good ways to implement it?
I have following questions:
1) Atlas Sprite
I read here on the forum that the most efficient way is to use a technique involving a single texture image and many sprites referencing it?
Is this correct? I do not understand if this applies in my case. As jigsaw puzzle pieces are not square and they interfere each other, I think I would need to use a mask and process each piece. Then pieces cannot be considered anymore parts of the original anymore.
So maybe I need to preprocess at runtime the original image, to cut rectangular pieces, mask them and then compose a tiled image.
Then this piece I would reference using the Atlas technique. I am on the good way?
The preprocessing I described is doable? It will take a longtime to complete? I would need to do it at runtime as I intend to let the user to choose
own images for the puzzle game.
2) Maybe I should use a simple sprites?
I would need again to obtain puzzle pieces by masking the original image against a black shape of puzzle piece.
I wonder if I should first crop a rectangular piece of the original image or maybe this is not necessary and it's a waste of time?
On the other hand if I don't do this I think I will waste memory with unnecessary big rectangles.
Thanks