Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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!

share|improve this answer
    
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.. –  MFarooqi Jun 6 at 15:22
    
+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 –  rajpara Jun 20 at 9:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.