Moving to Cocos2D-X, some newbie questions

Hello guys,

I decided to give it a try and I would like to ask you few newbie questions.

I see a lot Cocos2D versions, cocos2D-X , cocos2D-JS ,Cocos2D-iPhone, etc, is the only difference the programming language? Are they compatible with each other? Or they are different things with different features? If yes what are the limitations of each one? And in terms of performance? For example why do we have Cocos2D-iPhone if Cocos2d-x can deploy to iOS?

I am planning to use cocos2D-X with C++, and I see a lot stuff that is confusing me where to start, such as:
-Cocos2D creator - is this compatible with normal cocos2D-x projects? Or using this creator requires full dependency on it? Is it production ready?
-SDKBOX - same questions here.

I plan to use C++ language, to take full effort of cocos2D capabilities, should I use this tools? I see so many different paths that I am trying to understand it properly before starting :smile:

Thank you guys.

An interesting history lesson:

  1. @ricardo started Cocos2d-Python - named after a town in Argentina
  2. Then he moved from Python to Objective-C and Cocos2d-iPhone was born.
  3. @walzer used Cocos2d-iPhone as inspiration and made Cocos2d-x, which runs on mobile devices and desktop operating systems. Cocos2d-x allows a language choice of C++, JavaScript and Lua.
  4. Some time passes and Ricardo joins up with Walzer as Chief Software Architect at Chukong.

Cocos Creator is for JavaScript based projects. Lua and C++ support are being added. Cocos2d-x is the game engine itself and also what is under the hood of Cocos Creator. You can use Cocos Creator and also just normal code as you wish. You can think of Cocos Creator as a unified development tool to help merge design and code into one place.

SDKBOX is a partner to Cocos2d-x. You can add SDKBOX plugins to your Cocos2d-x projects to gain additional functionality for monetization, in-app purchase, Facebook, etc. Please see this

Yes, there are many, many ways to get started. Right now, if you are using C++, you cannot use Cocos Creator.

1 Like

Hey slackmoehrle,

Thank you for your clear explanation.

I have just one more question, is there any difference regarding performance using Cocos2D-X C++ or Cocos2D-X JS? I am trying to decide between this two languages, my experience with then are equal(not much) , any advise? I am not aware about advantages/disadvantages they have with cocos2D engine.

Thank you

cocos2d-js is a good choice, it s performance is very good! Script enable u to make game easily and quickly. If you want to use cocos2d-js, you can start with cocos creator with Entity Component like Unity :slight_smile:

@TMSantos

Use JS (cocos2d-js) for web games (games that run on web browsers, such as chrome, firefox etc.).
User C++ (cocos2d-x) for games that run on native platforms (iOS, Android, Mac, Win, Linux etc.).

I am going out on a limb here and saying that C++ is probably faster. I don’t want to start a flame war.

But really it comes down to what language do you know. If you know JavaScript, just use it. If you don’t know any languages, what language can you learn and understand the easiest?

Well I’ve been running into some problems in javascript where certain functions appear to be missing as opposed to c++ or objective-c, but I may just as well have failed to locate those, so far apart from z-odering customsprites on a tilemap every feature I needed was there and being able to use cocos creator really has it’s advantages over pure programming.