framerate on BB Tablet

Hi,

I just have been able to run the Cocos2DX hello world sample on a playbook physical device, and my surprise has been the framerate: 55-56fps, but sometimes it goes down to 49fps, isn’t that a problem? I have to port a game that its gameplay moves fast and then I need a fluent framerate.

thks

Dear,

According to the code in “cocos2dx/platform/qnx/CCAppliction_qnx.cpp”, frame rate of Cocos2dx on BB tablet was implemented with frame interval.
You can set the frame interval with “CCDirector::setAnimationInterval()”, say “pDirector->setAnimationInterval(1.0 / 60);”,that means the time interval between two frames will be 16 milliseconds, or you can get 60 frames in 1 second.
BUT! It is not guaranteed.
Cocos2dx will try to update the screen every 16 milliseconds, only if your update logic (such as modifying objects’ location) can be finished in 16 milliseconds.
If your code takes a long time to finish, which is longer than 16 milliseconds, you will get lower frame rate.

So, the frame rate depends on your own code.

The good news is that PB has a powerful hart, you can get fluent frame rate in most cases.