Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

BlackBerry Employee
Posts: 1
Registered: ‎01-22-2013
My Device: R072 London 1Gb RAM
My Carrier: Rogers

Jerky motions when using cocos2d-x

Hi Guys,


I am using the latest cocos2d-x (version: 2.0-x-2.0.4 from Nov 02, 2012) and I ended up having jerky motions primarily noticeable during rotations.


I am not sure for 100%, but it looks like it is a result of big differences between time gaps separating frames. Even if you run perfectly empty cocos2d-x scene and activate frame rate display - you will see that fame rate jumps like crazy from 46 to 58 (it supposed to be 60).


This frame rate controlled by code found in “cocos2dx/platform/blackberry/CCApplication.cpp” file, which is one of the files that binds cocos2d-x and BB10 platform. And this code relies on accuracy of clock_gettime(CLOCK_REALTIME,…)  function. This function must be very accurate (up to half of a millisecond) in order to guarantee more or less smooth motion; but it doesn’t look that it's the case. It is also better to have any timer synchronized with screen refresh - so that all OpenGL drawing for particular frame made by cocos2d-x will fall between two screen refreshes, and that would guarantee very smooth drawing (iOS has such timer and as result cosos2d renders motions very smooth).


So, can anyone answer how accurate is this clock_gettime(CLOCK_REALTIME,…)  function? And if it isn’t very accurate what should be used instead?


Second question: does BB10 platform have any screen refresh connected timer?


Guys, hundreds of apps and games are written using cocos2d for iOS and until cocos2d-x runs really smooth on BB10 platform it will be very challenging to port them.