cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Home Page:https://www.cocos.com/en/cocos2d-x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cocos2d-x v4.0 Performance issue on Android vs 3.17.1

SeptemHuang opened this issue · comments

  • cocos2d-x version: v4.0、v3.17
  • devices test on: HUAWEI P20
  • developing environments
  • NDK version: 16b

Steps to Reproduce:

  1. add sprite and label x 1000 in scene let the draw call reach 1000 more
  2. run or not runAction is no different

v4 fps much lower than v3.17

video link:
v4
https://imgur.com/Eu2EHsH

v3.17
https://imgur.com/rGtFuQ6

Could you attach code to reproduce an issue?

Yeah, the code is some thing just like that
Make the draw call higher will easier to see the fps drop in v4

Could you attach code to reproduce an issue?

here

auto scene = Scene::create();
auto layer = Layer::create();
layer->setPosition(Director::getInstance()->getVisibleOrigin());
scene->addChild(layer);

auto visibleSize = Director::getInstance()->getVisibleSize();


for (int i=0 ; i<3000 ; i++)
{

    Sprite *sprite = Sprite::createWithSpriteFrameName("test.png");
    sprite->setPosition(Vec2(random(0, (int)visibleSize.width), random(0, (int)visibleSize.height)));
    sprite->setScale(0.5);
    layer->addChild(sprite);

    Label *label = Label::createWithSystemFont(StringUtils::format("%d", i), "Arial", 15);
    sprite->addChild(label);
}


Director::getInstance()->runWithScene(scene);

any progress here?

any progress here?

No, I start to doubt the cocos2d team was gave up to maintain cocos2dx.

any progress here?

No, I start to doubt the cocos2d team was gave up to maintain cocos2dx.
you maybe right, the official team has given up the cocos2dx project, it is a pity