How to make cocos2d-html5 code compatible with cocoonjs for deployment to native stores

Hi all,

I think you all know about ludei.com which includes a cloud compilation system in which we can compile the javascript code to native , so we can install it on ios and android. I have seen that they support cocos2d-html5 as their game engine. The only limitation to be compatible with cocoonjs is it should include pure javascript. The documentation says that we can create canvas element as

document.onload = function()
{
var canvas = document.createElement(‘canvas’);
canvas.width = 600;
canvas.height = 400;
canvas.id = ‘gameCanvas’;
document.body.appendChild(canvas);
}

I have included this code in the cocos2d.js at the starting point of the function and made a hello world app ,which runs on browser but it has problems launching android , do you have any ideas?

Please Reply.

Please reply, I want an efficient way of doing this, I have deployed MoonWarriors using Phonegap to android but the fps is very low. I think to make it compatible is best but I don’t know how to do it.

Sorry, I have not experience in cocoon.js.
However, it should works well in theory.

Does anybody share something to help Srikanth in cocoon.js?

Did anyone figure this out yet? I have made the endless runner using Cocos2djs 3.0. I am able to run it on browser but not able to make it work on android using Cocoonjs and google chrome webstore.

pls help

Can someone tell me what CocoonJS is used for exactly? Is it something that is needed or does Cocos2d-JS provide all a developer needs to make a game without CocoonJS.