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

Scoreloop

Reply
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer
My Carrier: -
Accepted Solution

Problems with Scoreloop

How get user identifier? Somewhere in header files were comment that referred to SC_User_GetIdentifier but this method was removed.

 

SC_HandleCustomEvent looks not working. I won't use bps events, because this mean changing of cocos2d-x code, but if i'm called SC_HandleCustomEvent regularry (by timer) nothing happens.

Please use plain text.
BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve
My Carrier: Vodafone

Re: Problems with Scoreloop

Hi,

 

Its true - we did remove the SC_User_GetIdentifier() method.The identifier is linked to the login name and is an internal field, that the reason we removed it. But why do you really need it ? as you can identify the users by just using the login. If you are looking at this to compare two users, there is an API called SC_User_Equals() which you could use.

 

When you use SC_HandleCustomEvent, you need to make sure you are calling it on the same thread on which you have called the Scoreloop APIs ?  i.e you need make sure all Scoreloop calls are on the same thread as SC_HandleCustomEvent() and it should work.

 

Let us know in case you still have issues..

 

Thanks, Best Regards

Prenitha

 

Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer
My Carrier: -

Re: Problems with Scoreloop

SC_HandleCustomEvent() called in main thread, but nothing happens :\

 

Since it doesn't work  i can't check, is user login available after first launch(before user change something in his profile?) i need some uid for identify player on server, even if player do nothing in settings and want play as "player0123235475".

 

Looking at scoreloop as crossplatform-solution (ios/android/qnx) but fact that it haven't any ready-in-box UI - make things harder that they can be done with OpenFeint on android/ios...

 

And another question: is simulator render all properly? i'm launch sample with virtual keyboard, but in simulator got flickering and sample non rendered as expected.

Please use plain text.
BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve
My Carrier: Vodafone

Re: Problems with Scoreloop

SC_HandleCustomEvent() is called in main thread.. But what about the Scoreloop API calls, are you calling that as well on the main thread ?

 

Also, did you set the run-loop-type to SC_InitData to SC_RUN_LOOP_TYPE_CUSTOM:

 scData.runLoopType = SC_RUN_LOOP_TYPE_CUSTOM;

 

In case the issue still persists, could you send me your run-loop code snippet ? We could take a look and check if you are doing something incorrectly.

 

About the user-identifier: 

The first time, a device/user  connects to Scoreloop, he is given an automatically generated user name .. i.e Something of the form "Player 12345".  However internally, Scoreloop assigns the unique immutable identifier with the user that is then used in all subsequent connections. The API SC_User_GetLogin() may be used to get the user login. Many developers encourage the users to change the automatically generated username to something more personal. So, the login will not be unique and it can be changed at any point.

 

Are you looking at the identifier for uniquely identifying the user and storing the uuid on your server ? 

 

About the UI : Many developers prefer to have their own UI to match with their game's look and feel. Thats the reason we have the Core APIs which provide the functionality and not the UI. Many developers on the other hand prefer easy integration and therefore want the UI also. So, Scoreloop built standard UI components for android and iOS. So, if you look at - we do have UI components for Android and iOS.  However, the standard UI components are still not available on QNX. Generally, we have always started with Core APIs and then later on we have built the UI components.. So, as the first step we have Core APIs for QNX in place. At this point in time, I am not in a state to tell you if and when the UI components will be available. 

 

We have not had any issues with rendering the sample on the Simulator. Probably its something to do with the machine you are using. 

Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer
My Carrier: -

Re: Problems with Scoreloop

Are you looking at the identifier for uniquely identifying the user and storing the uuid on your server ? 

 Yes.

Please use plain text.
BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve
My Carrier: Vodafone

Re: Problems with Scoreloop

Hi,

 

Somehow I missed this reply of yours...  So, really sorry for the late reply.. 

 

The user identifier which is used for uniquely identifying the users is internal to Scoreloop and is not meant to be exposed. Scoreloop will not provide access to this due to privacy and security reasons. 

 

Thanks..

Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer
My Carrier: -

Re: Problems with Scoreloop

It's a pity, since in openfeint we can get id without problem. UniqueID improtant in some cases, but except device id - there is no way to uniquely identify user.

 

What if we want show some information from our game server about user friends? How we can get it? Yes, we can get user's friend list, but what then? Use their logins? That can be changed by user.

Please use plain text.
BlackBerry Development Advisor
Prenitha
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve
My Carrier: Vodafone

Re: Problems with Scoreloop

One alternative would be to use the UserContext to save a unique key associated with the user.  There is an option to submit the user context and also retrieve it back from the Scoreloop server. There is a specific use-case code snippet provided in the Integration guide of Users. You can take a look at it.

Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer
My Carrier: -

Re: Problems with Scoreloop

Thannks, i'll examine that, looks like possible solution.
Please use plain text.