difference between cocos2d-x vs cocos2d-js

| | August 4, 2015

I’m just moving towards native 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..
Can somebody please tell me.. what exactly these 2 things are..
My questions are..

  1. Can we developer 100%pure native apps/games in cocos2d-JSB and or cocos2d-javascrpoit.
  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 we need cocos2d-html5 to make it previewable in IOS/Anroid/windowsPhone..

Please give me Details.. because i’m so confused… I want to develop native apps for IOS/Android and Windows.

Thank you

One Response to “difference between cocos2d-x vs cocos2d-js”

  1. Cauê Costa Rodrigues on November 30, -0001 @ 12:00 AM

    It’s quite simple actually: cocos2d javascript is the join up of cocos2d-x’s JSB and cocos2d html5. It’s just a name given to that mix up.

    JSB is a set of Javascript native function overwrites that, when interpreted by the necessary scripts, are converted to their native correspondents. And these native functions are interpreted by the compiler, resulting in an application.

    My suggestion is that you program your games in cocos2d html5 AND use cocos2d-x JSB to do the heavy lifting for you. But I’ll already warn you, there will be small code modifications and to create an IPA, you will need to compile using Xcode, what means you will need a Mac.

    So, answering in order:

    1. Yes, you can. Because of JSB.
    2. It is a set of scripts made to convert your JS code into it’s native equivalent;
    3. It’s the join up of cocos2d-html5 with JSB, it is what makes the true cross-platform possible. You don’t need to actually use html5, but i strongly recommend. Using it will let you debug in browser before trying to deploy

    Maybe these links will be useful to you:

    1. http://www.raywenderlich.com/32970/how-to-make-a-cross-platform-game-with-cocos2d-javascript-tutorial-getting-started
    2. http://www.raywenderlich.com/33028/how-to-make-a-cross-platform-game-with-cocos2d-javascript-tutorial-the-platforms

    Good Luck!

Leave a Reply