Feedbacks of v3.0-beta

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?

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:

Thanks for the explanation.

But I wonder what is the point to make “improvements” which degrade functionality? Cocos ver 2 can handle even much larger maps, and ver 3 can’t even small ones? I like cocos2d-x api, but ver 3 with such limitiations is just unusable (on desktop of course), back to the stone age. I think the point of improvements is to enhance, not to degrade. Don’t be Google :slight_smile:

Unfortunately I don’t have enough knowledge to make such a patch.

Piotr:

Were you able to use 600x600 map on cocos2d-x v2 ?
If so, I would be surprised. But if there are maps that you can render on v2, but you cannot render on v3, then it is a bug and we are going to fix it.

Please, let me know if that is the case. thanks.

Will you implement the rich text label,which like the textField in actionscript?How soon? Thanks.

@Darus Pan
We plan to support rich text in v3.1.

@Minggo Zhan
thanks.

And, will you put the docs into download packages? Because if you upgrade the docs online and my cocos version doesn’t upgrade, then I cannot find the correct docs for my version.

hello! I transplant the label from 3.0 beta to 2.1.5, but I found the label has some problems about position and layout, I tested it in 3.0 beta , it has the same problem.
Thanks!

Ricardo Quesada wrote:

Piotr:
>
Were you able to use 600x600 map on cocos2d-x v2 ?
If so, I would be surprised. But if there are maps that you can render on v2, but you cannot render on v3, then it is a bug and we are going to fix it.
>
Please, let me know if that is the case. thanks.

Sorry, my mistake. Now I see, I have previous, 3.0 version in mind.

At this time I have tested both 3.0: alpha0 and alpha1. They can handle 3-layered TMX maps with size over 1000x1000 32px tiles without problems on desktop (intel graphics 4000) with 60fps scroll animation. Unless I’m doing something wrong, but I see nice fast scroll, so I think it is real :smiley:

But to exclude probability of any TMXTiledMap bugs, I have also created simple direct test for batch node:

void MainScene::testBatchNode()
{
    SpriteBatchNode *batchNode = SpriteBatchNode::create("ground.png", 20000);

    for (int y = 0; y < (10 * 100); y++)
    {
        Rect rectTile = Rect::Rect(y % 8 * 32, y % 3 * 32, 32, 32);

        for (int x = 0; x < 100; x++)
        {
            Sprite *player = Sprite::createWithTexture(batchNode->getTexture(), rectTile);

            Point playerPos(x * 32, y * 32);

            Point anchor(0,0);

            player->setAnchorPoint(anchor);

            player->setPosition(playerPos);

            player->setTexture(batchNode->getTexture());

            player->setOpacity(80);

            batchNode->addChild(player);
        }
    }

    this->addChild(batchNode);
}

This handles 100k sprites with 60fps.

Unfortunately all of these tests fail on 3.0 beta. I don’t know how renderer works, I only know, that alpha version can handle everything, and beta can’t :smiley: I hope it is fixable, because there is no such another great framework like cocos2d-x (except native Apple SpriteKit of course) :smiley:

If you need some tests or sth, I will be happy to help.

will you put the docs into download packages? Because if you upgrade the docs online and my cocos version doesn’t upgrade, then I cannot find the correct docs for my version.

Hi All,

I reported several bugs, but no feedback is found, please have a look, thanks!

http://cocos2d-x.org/issues/3711
http://cocos2d-x.org/issues/3697
http://cocos2d-x.org/issues/3696
http://cocos2d-x.org/issues/3679
http://cocos2d-x.org/issues/3634

Ricardo Quesada wrote:

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.

I totally understood the reason to remove some functions which have been overlapped with something similar. But just it takes a while to follow your mindset since some minor changes may not be found on release note or related documents in the first day.

Actually, I am doing something simple as zoom in effect which not yet necessary for touching the OrbitCamera I believe. Now I achieved by scaling up the whole layer, but this may not be perfect I believe. It may be better to add more of actions like zoomIn, zoomOut instead of adding back something old.

Just one suggestion for removal of the feature. Remember to mark it down in the release note and made suggestions if possible for the removal like.

Before:

-    Node::getWorldPosition()

-    NotificationCenter::getInstance()->addObserver(this, callfuncO_selector(Audio::pause), "audioPause", nullptr);
-    NotificationCenter::getInstance()->addObserver(this, callfuncO_selector(Audio::resume), "audioResume", nullptr);

After:

// Notice that you have to understand what is your target to 
+    Node::convertToWorldSpace(Node::getPosition())

+    auto dispatcher = Director::getInstance()->getEventDispatcher();
+    dispatcher->addCustomEventListener("audioPause", CC_CALLBACK_1(Audio::pause, this));
+    dispatcher->addCustomEventListener("audioResume", CC_CALLBACK_1(Audio::resume, this));

Eric Wo wrote:

Jonathan Yeung wrote:
> 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 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?

Now I am working with using the command line to build the project. Even it cannot be built, for “Run” is fine.
Even I tried to add back the old .cproject but it cannot help.
Just a little bit inconvenient but has to wait if there is any suggestions coming.