difference between cocos2d-x vs cocos2d-js

MFarooqi picture MFarooqi · Jun 2, 2014 · Viewed 10.9k times · Source

I'm just moving towards mobile apps... A friend of mine told me to start with cocos2d, I'm good in javascript. while searching google for cocos2d, and within cocos2d-x.org I found

  1. cocos2d-x
  2. cocos2d-JSB
  3. cocos2d-html5
  4. cocos2d-Javascript

I know what cocos2d-x is for and what cocos2d-html5 is for, but what is cocos2d-JSB and cocos2d-Javascript?

My questions are..

  1. Can we develop 100% pure native apps/games in cocos2d-JSB and or cocos2d-javascript.
  2. I also know cocos2d-JSB is javascript bindings, but what does that exactly mean?
  3. Last but not least question: what is cocos2d-Javascript for? does that work alone or do we need cocos2d-html5 to make it previewable in iOS/Android/Windows Phone?

My aim is to develop native apps for iOS/Android and Windows.

Answer

Shun Lin picture Shun Lin · Jun 5, 2014

Cocos2d-JS is Cocos2d-x engine's javascript version, maintained by Cocos2d-x team. It supports full Cocos2d-x functionality with a set of simplified javascript friendly APIs. It contains two parts: Cocos2d-html5 and Cocos2d-x JavaScript Bindings (JSB), and Cocos2d-html5 is a pure JavaScript engine for web, and Cocos2d JSB is for native app which share the same API with Cocos2d-html5.

So, Cocos2d-JS provides a consistent development experience for whichever platform you want to distribute to, either web and native. You can use it to develop web, android, iOS, mac, windows app. The windows phone8 is coming soon. You can develop your game on browsers with Cocos2d-html5, and then compile to native app with Cocos2d JSB.

Cocos2d-JavaScript is totally different from Cocos2d-html5 and Cocos2d JSB. It was branched from cocos2d-iPhone and maintained by Ryan Williams.