Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

I think its C++11

  1. auto
  2. lambda

And it has no unnecessary use of prefix CC

One of the changes that happened between Cocos2d-x 2.1.5 and 2.2 was the removal of templates for projects in XCode (I do not know if project templates existed in VS, etc).

The new build system creates projects under the Cocos2d-x installation (at least on Mac) and that is where the project files appear to reference them. This makes it very difficult to move the project without hand tweaking. It also makes configuration management more painful, depending on how you set up your system (e.g. a root/tree like svn or a "drop it anywhere" like git).

Also, the Cocos2d-x library is built as that, a library. In previous incarnations, it was placed directly into the project. On one hand, if you don't alter the root library code, this makes good sense. On the other hand, if you occasionally tweak things for a specific project, you have altered all your projects that depend on it. Yin/Yang.

I'm still very positive on Cocos2d-x. I have not upgraded to 3.0 or 2.2 yet. When it matures a little more, I will switch over, regardless the changes. For what I need, I'm pretty sure it will still get the job done (well).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top