Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the advantages of using cocos2d-x 3.0 over cocos2d-x 2.x?

Cocos2d-x 3.0 alpha was released for some time now. What was improved over cocos2dx-2?

The features list is quite important, but in terms of performance are there new limitations/improvements?

Have you noticed real improvements in performance, development patterns, APIs and support?

like image 351
Coyote Avatar asked Dec 20 '13 01:12

Coyote


People also ask

Is Cocos2d cross platform?

Cocos2d-x is a mature open source cross-platform game development framework that supports 2D and 3D game creation. The engine provides rich functions such as graphics rendering, GUI, audio, network, physics, user input, etc., and is widely used in game development and interactive application construction.

How much does Cocos2d cost?

Cocos2D is free, open source and more up-to-date. Unity, however, is expensive. It has a free license but is insufficient for professional game developers. The license cost is between $ 1,500 and $ 4,500 more per person (plus tax), which is a significant barrier to new developers.

Is Cocos2d-x free?

Cocos2d is a free software framework. It can be used to build games, apps and other cross platform GUI based interactive programs. Cocos2d contains many branches with the best known being Cocos2d-objc, Cocos2d-x, Cocos2d-html5 and Cocos2d-XNA.


2 Answers

I've been using it recently and from what I've noticed the main differences are that everything is namespaced now, so you don't have to deal with the prefixed names that came from the objective c patterns, so cocos2d::Point instead of CCPoint (especially for enums, (Texture2D::PixelFormat::RGBA8888 instead of kCCTexture2DPixelFormat_RGBA8888)).

Also some of the event stuff now has support for c++11 lambdas.

A more complete list of the changes can be found here: http://www.cocos2d-x.org/wiki/Release_Notes_for_Cocos2d-x_v300

but for the most part of using it myself, it's just made to feel more like C++, instead of like objective-c.

like image 110
Kevin DiTraglia Avatar answered Sep 28 '22 04:09

Kevin DiTraglia


I have switched and am finding it pretty stable. The main advantages so far ...

  • Real buttons, instead of menus
  • Real-time spritesheets
  • SpriteBatchNodes are no longer recommended and I did see a drop in draw calls where I not optimized
  • less objective C patterns.
  • more modern. namespaced instead of 'CC'. C++11.
  • more platforms supported

Main disadvantages for me:

  • EventListener pattern. I can't figure out how to get touch input to affect any objects other than the Node that triggered the event.
  • We use a lot of text-only buttons for debugging and they are hard to lay out :)
  • Lack of documentation and example code. For example, I could not find any documentation of how to use the Layout class anywhere.

It is a lot of work porting, but for us we had to decided to risk it since we would end up maintaining an out-of-date code base. It took about 5 person-days to port our game over. The game is now stable and we did not run into a single bug in cocos.

like image 32
ohthepain Avatar answered Sep 28 '22 02:09

ohthepain