Confused between -javaScript and -HTML5 and which should I be using?

Confused between -javaScript and -HTML5 and which should I be using?
0.0 0


Hello all

I’ve been searching for an engine to do some cross-platform games that are HTML5/CSS3/JavaScript based as I imagined I could develop for web browsers and then use Phonegap to publish to mobile. I had used the Objective-C port of Cocos2D a little bit with Xcode in the past so I was curious to see if it had been ported to JavaScript. Sure enough as with most things digital turn your back for 18 moths and bang! The eco-system has gone haywire :slight_smile:

So it would seem there are numerous version of Cocos2D but I’m confused about which to use. If I were developing exclusively for iOS then I realise Cocos2D for iPhone would be my best choice but it seems there are two choices for ‘JavaScript’. Why am I focusing on a JavaScript version? Well firstly because I’m teaching myself JavaScript and I’m looking for new challenges with it and secondly because I’m already using Phonegap to take HTML5/CSS3/JavaScript apps onto mobile platforms.

Four questions

  1. What’s the difference between Cocos2D-HTML5 and Cocos2D-JavaScript

  2. Which should I be using?

  3. What are “JavaScript bindings”?

  4. Am I correct in thinking I don’t need the Phonegap build stage as it looks like the point of either framework is to create cross-device code?


  1. ~~html5 is made by the same people as cocos2d-x, it is in sync with latest version of cocos2d-x and cocos2d-iphone, a part of coordinate release

  2. you should use~~html5 as its features are more complete than ~~javascript, furthermore it supports javascript binding on cocos2d-x or cocos2d-iphone

  3. JSB refers to binding javascript functions to their respective c++ or objective c function, it allows you to use the same code written for~~html5 and runs natively on cocos2d-x and cocos2d-iphone, to make native apps with native performance

  4. with html5, as long as you stick to official cocos2d API, you won’t need to do much to make native games on android and iphone, if somehow you decided to usejavascript, then you need to use phoneGap or similar framework to make it work on native