Feedbacks of v3.0-beta

Cocos2d-x v3.0 beta is released today. http://www.cocos2d-x.org/news/172, as well as CocoStudio v1.2 and Cocos2d-html5 v2.2.2.
So eventually, we have added all key features for v3.0 roadmap. There will be only bug fixes in the next version(s), v3.0-rc or v3.0-final in March.

Please leave your feedbacks for the new version, especially for v3.0-beta, new renderer, template containers, new label etc. here. I know that many developers will complain on templated containers :wink:

Still appears to be a kerning bug with the beta, see below for more details…, other than that so far so good, still need to port my existing 2 sided page turn transition to the beta, so will see how that goes :slight_smile:

The new GUI library/system seems not properly integrated to win32 and android build. I can include “CocosGUI.h” on my iOS/Mac build and run it fine but not with win32 and android, they complain about the header not existing.

Tried this solution but it didn’t work for me:

I really like the new GUI system. Hopefully this hiccup will be resolved soon. Thanks for the great job! :slight_smile:

Beta already! This is exciting. I’m eager to try out the changes.

Thanks for all the hard work :slight_smile:

Thanks for the effort of making the game engine improving from time to time.
I am now moving my project from 3.0alpha1 to this version.

I didn’t mention what I feel good since it is mentioned by everyone. But there are some points missed that I would like to share.

  1. There are something removed but I cannot find out in release note
    a. CCCamera removed - I checked out the same functionality can be achieved by “additionalTransform” by now with some changes inside. But it takes time for me to reference to old CCCamera class to find out those matrix related stuff. I would suggest if it is better to provide some simple example to follow.
    b. Node::getWorldPosition() removed - I cannot find any message about this. Node::convertToWorldSpace can definitely achieve the same purpose.
    c. Better to have listed out the class name changes in GUI. Something like UILayer is removed, UIWidget changes to be a subclass as Node will imply uiLayer~~>addWidget needs to be changed into layer~~>addChild etc.

  2. The project creator created android project is not CDT project when I import into Eclipse. There is still no clue for me as of now even I add back the C++ support. For sure I can use command to build the project but it will be better if it can also be done in Eclipse.

I can’t seem to be able to access HttpClient or anything else from /network when building for Android, however, the Mac/iOS builds of my project are fine.

If I use #include <network/HttpClient.h> in the cpp I’m trying to use HttpClient in, it’s fine on Mac/iOS but the android build_native.py tells me the file or directory doesn’t exist.

I tried adding #include “network/HttpClient.h” etc. to cocos2d.h which, again, was fine in xcode but threw up the same “the file or directory doesn’t exist” at any mention of the network folder.

I tried adding HttpClient etc. to Classes/ but then had issues accessing curl by any means.
This included adding the following lines to my Android.mk in proj.android/jni:
LOCAL_WHOLE_STATIC_LIBRARIES = curl_static_prebuilt
$
Is there something obvious I’m missing or perhaps a workaround to this issue?
Extra Info: This is a C
+ multi-platform project made using ‘create_project.py’ on OSX 10.9.1 and I’m using the terminal for building etc.

Any help or insight whatsoever would be greatly appreciated and huge apologies if this is the wrong place to be asking for it :slight_smile:

Is behaviour of setAdditionalTransform(AffineTransform) changed?
Code that worked in 3.0 alpha 1 has problems in 3.0 beta.
When AffineTransform.a or AffineTransform.d set to other then “1” transformation looks strange.

UPDATE: I have found a bug that causes the problem in CCNode
Here is pull request to fix it:
https://github.com/cocos2d/cocos2d-x/pull/5030

What I dont see is in v3 alpha I did this:

auto listener = EventListenerTouch::create(Touch::DispatchMode::ONE_BY_ONE);
...
EventDispatcher::getInstance()->addEventListenerWithFixedPriority(listener, 30);

Not in v3 beta, this has changed to:

auto listener = EventListenerTouchOneByOne::create();

but the ::getInstance() seems to be invalid and I dont see here: http://www.cocos2d-x.org/cocos-docs/manual/framework/native/input/event_dispatcher/en a suggested replacement

Also,

LayerColor::create() is now protected? as is initWithColor()

 cocos2d::LayerColor* pHUDLayer = new cocos2d::LayerColor();
    pHUDLayer->create();
    pHUDLayer->initWithColor(SMColors::cCharcoalGrey4B);

so is this:

logo = new cocos2d::Sprite();
    logo->initWithSpriteFrameName("veggietable.png");

I get why, but some of is have been using Cocos2D-x for a while and this creates a lot of work.

What I figured would be a simple upgrade from v3 alpha to v3 beta has produced hundreds of errors for me to not find a fix for.

Suggestions welcome!

I suggest someone should write a guide on how to migrate from alpha0 to beta. Without this guide, it is be quite hard to migrate. It is not necessary to be in English. I am confident someone will help to translate it.

The problem is something is missing from aplha1 to beta. We need to know how to check and fix.
So far got some issues on the following that was fine in 3.0 alpha1, but not on beta

  • Alignments
    • For example, we have a MenuItemSprite, and a label on top of it (as a child). Both of them is ANCHOR_MIDDLE.
  • Labels text

I agree. I am making it though most everything but I still dont see how to use:

EventDispatcher::getInstance()->addEventListenerWithFixedPriority(listener, 30);

now in 3.0 Beta. It doesn’t like getInstance() anymore.

way I’ve been working out things is by searching the cocos framework for command e.g addEventListenerWithFixedPriority which brings me to code like this…

auto dispatcher = Director::getInstance()>getEventDispatcher;
dispatcher
>addEventListenerWithFixedPriority(listener, –1);

so guess your alternative command is…

Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(listener, 30);

Hi Peter, That is what I ended up doing.

Why remove network header files in cocos2d-ext.h? And the official now recommend using std::string than String( or __String)?

Hi, fellow developers.

I’am cocos2d-x C++ beginner user, made some tests in alpha version. After switch to beta - some things got worse. I understand (and I hope), that new Renderer is not yet finished.

Here is first of my problem:

  1. created big tile map in Tiled. Exactly 600x600, 32px tile. 3 layers.

  2. loaded this map with TMXTiledMap.

  3. BOOM! CCRenderer.cpp/render(), line 251 throws assert “VBO is not big enough for quad data”.

Correct me if I’m wrong; as I understand from code:

  1. VBO_SIZE is set to fixed value, but I think it should be read in runtime initialization from OGL system config.

  2. Culling is not yet implemented, that’s why OGL is trying to process whole geometry.

Will these features be implemented? I want to create crazy big map :smiley:

Jonathan Yeung:
Correct. The old Camera object was removed, but it is still possible to call the OrbitCamera action.
Do you need the old Camera object ? Why ? We could re-added if needed.

Piotr Zagawa:
600 * 600 = 360.000 tiles. If you are using 3 layers, then 120.000 tiles per layer.
And each tiles needs 6 indices (we are using glDrawElements, and using a short of the indices).
So, you will need 720.000 (120.000 * 6) indices to render one layer.
But since we are using a short (it saves memory), it is only possible to transfer 65.536 indices per batch call.
That means that no more than 10.922 (65536/6) tiles per batch call.

So no, it you want to create a huge map, you will need to split it in more layers.

cocos2d-x v3.0-beta supports auto-culling, but only for “individual” objects. That means that if you have 600 sprites, it will only draw the sprites that are visible.

And we are treating the whole TMX map is treated as a single object.

Adding support for huge tmx maps is a good feature, but it is not currently planned for v3.0… well, unless someone sends us the patch for it :slight_smile:

@Oleg:
The order in the matrix multiplication is correct.

Could you post the code to reproduce the bug ? thanks.

I find a problem in this version, I have no idea whether it is the new renderer’s bug.
Please go here:

Jonathan Yeung wrote:

  1. The project creator created android project is not CDT project when I import into Eclipse. There is still no clue for me as of now even I add back the C++ support. For sure I can use command to build the project but it will be better if it can also be done in Eclipse.

I met the same question with you. It cannot work as v3.0 alpha when I import my project or sample in Eclipse on v3.0 beta. How to fix it?

I’m having issues installing the thing. I’ve created a new project, but some of the frameworks are red (doesn’t exist?) How do I install them in the Xcode Developer folder?

Daniel Pratt wrote:

I can’t seem to be able to access HttpClient or anything else from /network when building for Android, however, the Mac/iOS builds of my project are fine.
>
If I use #include <network/HttpClient.h> in the cpp I’m trying to use HttpClient in, it’s fine on Mac/iOS but the android build_native.py tells me the file or directory doesn’t exist.
>
I tried adding #include “network/HttpClient.h” etc. to cocos2d.h which, again, was fine in xcode but threw up the same “the file or directory doesn’t exist” at any mention of the network folder.
>
I tried adding HttpClient etc. to Classes/ but then had issues accessing curl by any means.
This included adding the following lines to my Android.mk in proj.android/jni:
LOCAL_WHOLE_STATIC_LIBRARIES = curl_static_prebuilt
$
>
Is there something obvious I’m missing or perhaps a workaround to this issue?
>
Extra Info: This is a C
+ multi-platform project made using ‘create_project.py’ on OSX 10.9.1 and I’m using the terminal for building etc.
>
Any help or insight whatsoever would be greatly appreciated and huge apologies if this is the wrong place to be asking for it :slight_smile:

I am now also trying the proj.win32 version with similar inability to locate any instance of the /network components. Is there any workaround / fix for this or is there something I’m missing?