Cocos2d-x vs Cocos2d

I know started learning Cocos2d-x about 3 days ago and I have to say that it really gets exhausting. Some friends who also are interested in GUI programming told me that my biggest problem with learning Cocos2d-x will be to find good learning materials and they were right. The documentation really isn’t very good and I still don’t understand why you don’t let the community help with improving the documentation. But the reason why I’m writing this is, that I’m unsure if I should learn the original Cocos2d with Python or Cocos2d-x with C++. My python programming skills are a lot better than my C++ skills. Today I already did a lot of research and now I know that C++ is better for game development than Python because it’s compiled, more lightweight has better performance which is especially for games needed and so on and so forth. My question is, if it would be better (for me) to start learning Cocos2d-x or continue learning Cococs2d. Is the performance of Python really so much worse than the performance of C++? Would I see any difference in performance in such an easy game like for example Snake? Any advice would be highly appreciated because at the moment I really don’t know any more what I now actually should learn.

Where did you find the community can’t help with documentation? By all means submit a PR for anything you want to improve.

You need to use whatever is best for you. If I isn’t cocos2d-x, try cocos2d or cocos2d-iPhone but keep in mind they are no longer updates and haven’t been for quite some time.

Perhaps try other engines too and see if you like them.

I have not tried cocos2d-x with python, first time hearing this :slight_smile:
But I’m using cocos2d-x with Java Script.
Performance is good for my game.
I’ve 60 fps on Android devices.

Stupid question, but is it possible to develop offline applications like that (with JS)?

Sure you can.

It’s not cocos2d-x with python

It’s the original cocos2d-python. Before obj c and before -x. It’s been deprecated for a long time and I don’t think anyone still works on it (or used it)

Do you have evidence language affects performance?

Node js versus C++

Scripting languages like Python usually are slower than compiled languages like C or C++. Python has to be interpreted (which takes additional processing power and time) whereas C or C++ get compiled into machine code and work a lot faster (and don’t need any additional software like interpreters!). Probably this is the reason why games usually are programmed in compiled languages. I asked this question because I was not sure if I already would see a difference with small games like Snake or that performance problems would only occur in really big games.

For a game like Snake you would not!

My humble suggestion is to write in whichever language you are most productive in.

Remember with cocos2d-x the main engine is written in C++, so the sprites, animations, physics, etc all will be very performant. The game specific code you write (most likely) will run just fine in Javascript or Lua if you are more comfortable developing in those languages over C++.

Good luck!

1 Like