Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Codea and Cocos2d

edited June 2012 in Questions Posts: 18

Hello all,
I was wondering if anyone knew of a way to turn a Codea project into a single scene for Cocos2d, that can be accessed from another scene.

Being fairly new to Codea and Lua many questions I've already had were fairly simple and already answered by someone on these forums, but I haven't been able to find a solution for this.

Any help would be much appreciated. Thanks.

Tagged:

Comments

  • JohnJohn Admin Mod
    Posts: 622

    You'd have to take all the parts of Codea and wrap them into a separate OpenGL view that you can run independently then transplant it into a cocos2d project. You'd have to use Cocos2D 2.0 because Codea uses OpenGL ES 2. It's possible but would take quite a bit of work.

  • Posts: 18

    Would there be any way you could point me in the right direction on how to do that?

  • SimeonSimeon Admin Mod
    Posts: 5,387

    If you examine the Codea Runtime Library you'll notice BasicRendererViewController. This class contains an EAGLView and draw loop, as well as script execution overhead and so on.

    In order to have both Cocos and Codea draw into the same view, you would have to transplant Codea's draw loop into a scene's update mechanism - and the scripting setup into the scene's construction. It would take a lot of messing around but I think it's possible. Perhaps it's something we should look at including so that Codea projects can easily be used as scenes in Cocos 2.0.

  • Posts: 18

    That's something that I would really like to see. Particularly because of the ease-of-use with Cocos when it comes to scenes and menus. Using Codea for everything else and then being able to simply transfer that to a Cocos scene would be really useful in my opinion.

Sign In or Register to comment.