Welcome!

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.


Reply
Highlighted
Contributor
Posts: 16
Registered: ‎01-06-2013
My Device: BlackBerry 10 - Z10 LE
My Carrier: Optus

Cocos2d-x + Scoreloop integration for BB10?

Hello guys,

 

I am currently working on a game using Cocos2d-x. I am wondering if there is any example on Cocos2d-x + Scoreloop integration for BB10 Native development. 

 

Any one also try upSL wrapper yet? The source code for this wrapper seems a bit out dated.

 

http://www.cocos2d-x.org/projects/cocos2d-x/assets/9

 

Thanks a lot!

Retired
Posts: 71
Registered: ‎11-08-2012
My Device: Blackberry 10 - Dev Alpha B | Blackberry Playbook | Blackberry Torch 9810
My Carrier: BELL Canada

Re: Cocos2d-x + Scoreloop integration for BB10?

Hello @xfstudio,

There are a lot of developers on the Cocos2d-x forum that may have tried upSL wrapper:

http://www.cocos2d-x.org/boards/6/topics/14197

William Hoang

Application Developer Advocate | Developer Relations
BlackBerry


Retired
Posts: 29
Registered: ‎03-19-2012
My Device: Z10
My Carrier: BELL

Re: Cocos2d-x + Scoreloop integration for BB10?

Hi,

 

Please take a look at this blog post on ways to integrate Cocos2dx and Scoreloop.

 

http://devblog.blackberry.com/2013/02/scoreloop/

 

cheers, Ram

Contributor
Posts: 14
Registered: ‎01-20-2013
My Device: Playbook
My Carrier: None

Re: Cocos2d-x + Scoreloop integration for BB10?

Hi Ram, I was reading that post, but I can´t figure it out how to handle events using SC_RUN_LOOP_TYPE_CUSTOM

What I don't know is how to listen events from the server, I have something like this:

if (!CCLayer::init()) return false;

    SC_InitData_Init(&scData);
    scData.runLoopType = SC_RUN_LOOP_TYPE_CUSTOM;

    errCode = SC_Client_New(&client, &scData, SCORELOOP_GAME_ID, SCORELOOP_GAME_SECRET,                              SCORELOOP_GAME_VERSION, SCORELOOP_GAME_CURRENCY, SCORELOOP_GAME_LANGUAGE);

 And a function:

 

void GameSL::OnScoreloopCustomEvent(float dt)
{
	SC_HandleCustomEvent(&scData, SC_FALSE);
}

 But with these stuff I don't know how can I detect an event. Can you help me?

 

Thanks!

 

PS: This class is a CCLayer, I'm trying to have a persistent layer with scoreloop.