v3.7 speed compared with 3.6

I test your code on iphone 4s, and it both give 10.5fps. It seems the performance is the same.

Before testing the performance, other applications should be terminated to give a accurate result.
Could you retest it?
Thanks.

Running my code on an iPhone 6 with 275 sprites:

Cocos2d-x V3.6 shows around 55 fps
Cocos2d-x V3.7 shows around 36 fps

I just noticed something REALLY strange!

V3.7 returns strange values from
Size visibleSize = Director::getInstance()->getVisibleSize();
Vec2 origin = Director::getInstance()->getVisibleOrigin();

origin cocos2d::Vec2
x float -0.0000152587891
y float 24.7887268

visibleSize cocos2d::Size
width float 480.000031
height float 270.422546

Can anyone else confirm this behaviour?

Could you please share the test case?
Thanks.

It’s the code have posted several times above - based on the standard created project, just displaying the same sprite a number of times

I think @Maxxx tests 3.7 vs 3.6

and @dabingnn tested 3.8 vs 3.6

maybe @dabingnn should test 3.7 instead, just to make sure

He tested 3.8 vs. 3.5. Or was this just a typo?

Sorry clearified.

Hi, I recently just started using cocos2d-x V3.7 and I’m seeing similar issue to you Maxxx. Though I’m testing on Android, when I call the getVisibleOrigin() I get the same output as you, I was expecting x=0 y=0 as I have the flags set to run in android’s Immersive mode.
I’m using the getVisibleOrigin, getVisibleSize returned values to draw a grey background, but because the vertical origin is not zero, the full screen does not have a grey background (i.e. a long black rectangle at the top). However if I build the project for win32 it works as expected.
I’d be grateful if anyone can share a solution (assuming there is one).

PS. I’m new to the forums, I just signed up looking for a solution to this problem. So apologies in advance if I’ve not followed the correct forum etiquette.

Cheers.

UPDATE: ok I managed to solve the problem with ā€œstrange return valuesā€. The issue for me was in the AppDelegate.cpp file in the ā€œapplicationDidFinishLaunchingā€ method, I replaced the templates default ā€œset design resolutionā€ code with the following. Hope this helps, but I do finally get sensible return values for size/origin.

AppDelegate::applicationDidFinishLaunching() {
    // initialize director
    auto director = Director::getInstance();
    auto glview = director->getOpenGLView();
    if(!glview) {
        glview = GLViewImpl::createWithRect("SimpleGame", Rect(0,0, 480, 320), 1);
        director->setOpenGLView(glview);
    }
    
    Size designSize = Size(480,320);
    Size resourceSize = Size(960,640);

    director->setContentScaleFactor(resourceSize.height / designSize.height);
    director->getOpenGLView()->setDesignResolutionSize(
    designSize.width, designSize.height, ResolutionPolicy::FIXED_HEIGHT);
    
    
    // turn on display FPS
    director->setDisplayStats(true);

    // set FPS. the default value is 1.0/60 if you don't call this
    director->setAnimationInterval(1.0 / 60);

    register_all_packages();

    // create a scene. it's an autorelease object
    auto scene = HelloWorld::createScene();

    // run
    director->runWithScene(scene);

    return true;
}