3d transformation of game world keeping gameplay 2d - COCOS2D 2.0

I want to rotate the game world, may be loading another .tmx file for another dimensions when user want to switch dimension.

The effect what I am looking for is something like the 'side' transition in Fez.

What I have thought of till now:

1. rotating CCCamera will be mandatory.
Question: How will I have the other part of the level in place while the camera rotates/rotating?

2. I can load a CCSprite and rotate it accordingly to the 3rd dimension. phew..!!
Question: When the camera and world is rotated, will the player controls work properly.. I think not...?

3. I think a better option would be to checkout with COCOS3D... there I could implement 3d world... right?
Question: Not sure how well 2d dynamics will work there as I want to user Box2d as physics engine..

Could anyone provide suggestions?

• Do you have experience in making of 3D games? So you want to have basically the same style as the Fez game? 3D but with a 2D perspective? Based on the name "cocos2D" I don't think that would be an easy task. Maybe your last option would be best... Do you have experience in any other language? Like c# or JavaScript? Because you could do this in unity easier than cocos3D... – Savlon Feb 3 '13 at 11:26
• thanks @Savlon for responding. I would prefer to opt out unity as it is a paid version and practically, I cant invest right now. Regarding the 3D experience, I have worked on MASCOT3D APIs in BREW on BruceLee3D title published on Verizon. But that was a long back and I dont want to revisit 3D in particular. What I want is to use 3D just for some part in my game that would fullfil my basic demand from 3D engine with ease - without going much into 3D. – Saurabh Passolia Feb 3 '13 at 14:40
• In regards to paying for unity, I understand. However, I believe the free version is sufficient to make any kind of game you like. As for the game style you are aiming for, I don't believe there are many ways to accomplish it without delving into 3D much. I personally can't speak much about cocos3D as I have never used it and have no idea what it contains... All I can say is good luck and I hope you figure it out! :) sorry I couldn't be more helpful – Savlon Feb 3 '13 at 23:41
• I thought the idea of Fez was that it was actually a 3D game? Everything was encoded in 3D, it just used an Orthographic projection (things don't get smaller in the distance) in comparison to a perspective projection (things do). – Matt Kemp Feb 5 '13 at 14:21
• Can you clarify: do you simply want to rotate the entire scene like a cube for transitions or do you want things in third dimension "mattering"? Fez is an example of the latter. The player interacts with map elements in three dimensions (albeit in an innovative 2d style). – Cameron Fredman Feb 6 '13 at 17:43

Take a look at this example code. In it, the author is manipulating a Wavefront OBJ (3D) using Cocos2d. It's a bit overkill for what you're doing, but if you spend some time with it, you ought to be able to manipulate a 3D cube with whatever you want drawn on a surface of the cube (e.g., your level).

A much simpler solution would be to go with one of the existing scene transitions built in to Cocos2d. Take a look at CCTransitionFlipX. It's not exactly what you're asking for, but it's very similar and might be satisfactory for you. Here's a demonstration of the scene transitions from github.

To some extent, you're trying to fit a square peg in a round hole. (Or maybe I should've said, you're trying to fit a 3D cube in a 2D circle). Cocos2D is not really intended as a 3D platform, although because of the limitations of Cocos3D, you're not the first to attempt to try workarounds in Cocos2D. I think it's worth seriously considering switching engines to one designed for 3D (like Cocos3D, as you mentioned). Once you have one 3D element, you're bound to want more.

You asked, "How will I have the other part of the level in place while the camera rotates/rotating?" This is a fairly broad question. Obviously you will have to do some (or all) of the loading of the next level before you can render it to a surface of a 3D object and render it to the scene.

Finally, it is indeed possible to use Box2D with the Cocos3D engine. Here's a link to a demo that implements Box2D in Cocos3D. Here's another. There aren't a ton of examples or discussion on how to do this, so you're going to be struggling with some issues to make this work, but you might find this page helpful, where someone shared a few of their lessons attempting to combine the two.

Hope this helps.

• will look forward through ur pointers – Saurabh Passolia Feb 16 '13 at 18:10
• Good luck. Keep us posted. – Cameron Fredman Feb 16 '13 at 20:29