Sliding Puzzle
Posted: Tue Nov 13, 2012 4:08 am
Hello,
I am very new to iPhone game development. I have just finished reading Steffen Itterheim's book on cocos2d. And I have created the 3x3 sliding puzzle game (number) without chipmunk (just for learning purposes); by changing the Sprites texture and keeping a 2 dimensional array to hold data.
I am just wondering if it would be possible to implement that using the chipmunk?
If someone can give me some idea on how to proceed that would be great. I think I can create the space to hold all 9 Sprites (tiles/block), where one tile is empty and the sprites are movable there ..... but my questions are
1) How do I shuffle/scramble the tiles/number blocks (do I still need to keep the 2 dimensional array for that)?
2) How do I determine when the puzzle is solved?
3) Is there any other better way to implement this using chipmunk?
Thank you in advance
- Murad
I am very new to iPhone game development. I have just finished reading Steffen Itterheim's book on cocos2d. And I have created the 3x3 sliding puzzle game (number) without chipmunk (just for learning purposes); by changing the Sprites texture and keeping a 2 dimensional array to hold data.
I am just wondering if it would be possible to implement that using the chipmunk?
If someone can give me some idea on how to proceed that would be great. I think I can create the space to hold all 9 Sprites (tiles/block), where one tile is empty and the sprites are movable there ..... but my questions are
1) How do I shuffle/scramble the tiles/number blocks (do I still need to keep the 2 dimensional array for that)?
2) How do I determine when the puzzle is solved?
3) Is there any other better way to implement this using chipmunk?
Thank you in advance
- Murad