Using Cocos-HTML5 for AppStore, Google Play, etc Apps

Hello,

I am very new to the Cocos framework. Can I develop a mobile game for iPhone, Android, etc with Cocos-HTML5 and distribute via the Apple App Store, Google Play, etc. Are there any articles on how to deploy a Cocos-HTML5 game to the Apple App Store, Google Play, etc?

Thank you for your assistance.

Rasika

Rasika Wijayaratne wrote:

Hello,
>
I am very new to the Cocos framework. Can I develop a mobile game for iPhone, Android, etc with Cocos-HTML5 and distribute via the Apple App Store, Google Play, etc. Are there any articles on how to deploy a Cocos-HTML5 game to the Apple App Store, Google Play, etc?
>
Thank you for your assistance.
>
Rasika

Have a look at http://www.phonegap.com/ You should be able to create a HTML5 game with Cocos-HTML5 and then build/deploy with PhoneGap. Be sure to read their documentation and instructions. To build and then deploy to the AppStore, you’re going to need a Mac with Xcode.

Hi Richard,

Thanks for the pointer to PhoneGap, looks very promising. The HTML5 documentation also mentions:

‘…the team of Cocos2d-x are working on something called “Javascript binding for Cocos2d”. What that means is your very same code running on Cocos2d-html5 engine can work flawlessly on Cocos2d-X and Cocos2d-iPhone without or with little modification. And all that translates to “almost native fast on mobile phones”.’

See http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Getting_Started_with_Cocos2d-html5 (See ‘Javascript?’)

Do you know if this is operational and if not is there an indication when it would be? I had trouble locating more documentation on this, particularly on the implementation side.

Thank you,

Rasika

Rasika Wijayaratne wrote:

Hi Richard,
>
Thanks for the pointer to PhoneGap, looks very promising. The HTML5 documentation also mentions:
>
‘…the team of Cocos2d-x are working on something called “Javascript binding for Cocos2d”. What that means is your very same code running on Cocos2d-html5 engine can work flawlessly on Cocos2d-X and Cocos2d-iPhone without or with little modification. And all that translates to “almost native fast on mobile phones”.’
>
See http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Getting_Started_with_Cocos2d-html5 (See ‘Javascript?’)
>
Do you know if this is operational and if not is there an indication when it would be? I had trouble locating more documentation on this, particularly on the implementation side.
>
Thank you,
>
Rasika

Hmm, I could only find this thread:

http://www.cocos2d-iphone.org/forums/topic/cocos2d-javascript-bindings/

Also, have a look at this post:

http://www.cocos2d-iphone.org/forums/topic/cocos2d-javascript-bindings/page/9/#post-373880

Rasika Wijayaratne wrote:

Hi Richard,
>
Thanks for the pointer to PhoneGap, looks very promising. The HTML5 documentation also mentions:
>
‘…the team of Cocos2d-x are working on something called “Javascript binding for Cocos2d”. What that means is your very same code running on Cocos2d-html5 engine can work flawlessly on Cocos2d-X and Cocos2d-iPhone without or with little modification. And all that translates to “almost native fast on mobile phones”.’
>
See http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Getting_Started_with_Cocos2d-html5 (See ‘Javascript?’)
>
Do you know if this is operational and if not is there an indication when it would be? I had trouble locating more documentation on this, particularly on the implementation side.
>
Thank you,
>
Rasika

I’m also curious about this very thing. If you can get the very same code from html5 engine to work flawlessly on the others, then why not just go html5 and then you’d be able to build on everything AND html5, so literally every platform and possibility pretty much. Can anyone shed more light on this? I was planning on starting cocos, now it’s a matter of if I should go cocos2d-X or html5 to be able to reach as many platforms as possible. Any info is greatly appreciated.

EDIT:
According to this tutorial you can get the same code working for Web + Mac + iOS + Android. Why is windows not there? If it has windows then it pretty much has everything except Linux and WP8 and other lesser used OS’s. But windows is a major OS that needs to be there, anyone know if it’s possible to release as an .exe and it just wasn’t added in that tutorial?

Richard, thanks for the links. There is some more information on this:

See http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Architecture_and_Directory_Structure (Scroll to ‘3. Javascript Binding’)

It mentions writing the code in JS (using Cocos2D-HTML5) and then being able to run on C/C*+ platforms using SpiderMonkey. The page below mentions embedding the C*+ SpiderMonkey library in your C/C*+ app. The SpiderMonkey library can run JS code, within your C/C*+ app once the library is embedded in your app.

See https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_User_Guide

And also https://developer.mozilla.org/en-US/docs/SpiderMonkey

So I guess this is how it works!

Hi, I’ve found this tutorial that explain how to make a game with cocos2d-html5 and deploy it to all platforms

this is the part two but there’s a link inside for the first part.
the version of cocos2d-html5 in the tutorial is not the current so something is different but I hope that the deploying part is still good (I never tried it so don’t know if it works)

I’m developing with cocos2d-html5 and js bindings, and it’s not easy. (lot of bugs and imcomplete bindings)

But fortunatelly cocos2d team work very fast solving problems & bugs.

Hi,I have follow the step,but its was error loading sources when loading,any solution for this?

Error: Failed to load resource: the server responded with a status of 404 (Not Found)

Nick Ronson wrote:

Hi, I’ve found this tutorial that explain how to make a game with cocos2d-html5 and deploy it to all platforms
>
http://www.raywenderlich.com/33028/how-to-make-a-cross-platform-game-with-cocos2d-javascript-tutorial-the-platforms
>
this is the part two but there’s a link inside for the first part.
the version of cocos2d-html5 in the tutorial is not the current so something is different but I hope that the deploying part is still good (I never tried it so don’t know if it works)

Hi St Goh, as I said I never try that tutorial, it’s very old but it should work on Cocos2d version 2.x.x. I think that the folders structure changed with the version 3 alpha so if you are with that version I doubt that the tutorial can work. if you are still with the 2.x.x then I really don’t know, maybe you could try to write a comment in the tutorial page and see if the author answer you.

Thanks Nick Ronson.

It is better to use the same version of cocos2d-x and cocos2d-html5, for instance, x v2.2 tohtml5 v2.2 or x 2.2.1 tohtml5 v2.2.1 and so on.

It had been tested before coordinated version release.