5
\$\begingroup\$

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 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 we need cocos2d-html5 to make it previewable in iOS/Android/WindowsPhone...

Please give me Details.. because i'm so confused... I want to develop native apps for iOS/Android and WindowsPhone.

Thank you

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

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!

\$\endgroup\$
3
  • \$\begingroup\$ Thank you very much for such details.. My reputation is less then 15 in stackexchange.com I can't ++ your reply.. Q...because i'm good in javascript and in html5 too.. Will i still need to learn c++/Java for better programming in any further stage .?.. for ios/android productions?. Thank you.. \$\endgroup\$
    – MFarooqi
    Commented Jun 6, 2014 at 15:22
  • \$\begingroup\$ +1 for your answer, I have one more question, can you please share your thoughts on this discuss.cocos2d-x.org/t/need-help-to-check-feasibility/14944 \$\endgroup\$
    – rajpara
    Commented Jun 20, 2014 at 9:55
  • \$\begingroup\$ Since Cocos2D-x V3 (now 3.2), Cocos2D-JS has replaced the JSB/HTML5/Javascript versions. See cocos2d-x.org/wiki/Cocos2d-js. You will probably find the RayWenderlich guides from Feb 2013 out of date but there are lots of resources on Cocos2d-x.org and in other places on the internet. Cocos2D-JS as one product now enables you to compile your game for the web and all the hardware devices supported by the Cocos2d-x base. Since you like Javascript and produce native apps, Cococs2D-JS is a perfect solution. \$\endgroup\$ Commented Jul 31, 2014 at 18:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .