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


Posts: 44
Registered: ‎01-06-2012
My Device: PlayBook
Accepted Solution


So, is anyone using ScoreLoop with the BlackBerry NDK? I have been messing around with it and am not finding any great resources of documentation/tutorials/etc. for it. I have a few questions that perhaps someone can answer:


1. What is the deal with username/password/login/name? At the moment I am initialising, creating a client, creating a user controller, and then requesting the current user. It comes up at something like "Player 43876667" which isn't something I have set up (I have never setup a username or password). I have seen the methods SC_User_SetLogin and SC_User_SetPassword - should I be calling these methods and setting them to a 'valid' user name and password?


2. Following on from number 1, is there a way I can get ScoreLoop to bring up a GUI/dialog to handle authentication, or do I have to go through all the trouble of doing that myself (and by 'I' really I mean every developer who wants to use ScoreLoop)?


3. I have tried uploading some high scores (with out changing the username/password) and it does indeed upload, so now I have scores assigned to "Player 43876667". Is this correct? Presumably this isn't a real user? Should it be letting this user upload scores?


4. Following on from number 2, is there a way I can get ScoreLoop to display high score tables and achievements?


I am sure I have other questions, but these would be a few initial thoughts from looking at it for the afternoon. I plan to press on with it for another day, tomorrow, regardless. Once the username/password/login stuff has been resolved I think I can sort everything else out (with a bunch of time spent writing GUI componetns) but I have my fingers crossed their might be some alternatives I am currently missing.


I look forward to your help.



Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer

Re: ScoreLoop

Hey Steve.


1. This is a stub that is created by default.

2. Have you looked at http://www.scoreloop.com/api/ ?

3. Using a stub for score submission might be an acceptable behavior for you application. This is dependent on your application logic.

4. Scoreloop retuns raw data such as user names and scores. It is up to you to decide how to display this data. In our sample we make use of GLES to do so.


We have a sample game called BelligerentBlock available on github that uses Scoreloop api :




This should be a good starting point for you. PM me if you have further questions.

BlackBerry Development Advisor
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve

Re: ScoreLoop

Hi Steve,


Thought of adding some more comments to this thread and answer some of your questions...


Did you check out the Scoreloop SDK documentation ? The link specified in the other thread points to our Android SDK documentation.


We have the latest Scoreloop SDK documentation for use with BlackBerry NDK  at https://bdsc.webapps.blackberry.com/native/beta/documentation/scoreloop/index.html



Answering your questions:

1.  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 a unique immutable identifier with the user that is then used in all subsequent connections. Users are encouraged to change the automatically generated username to something more personal, (see the integration guide for integrating Users for details about how to implement a user-profile update function SC_User_SetLogin etc). Please note that changing the username to something more personal or changing it multiple times does not affect the user account as only the "login name" changes.. The underlying identifier remains the same.

2. The first time a user connects to Scoreloop, an Eula Dialogue would appear (thats a part of Scoreloop) and if the player accepts it.. The user would be authenticated and a  unique immutable identifier along with automatically generated name would be given to the user.
3. This is fine.. The player is a valid player and he can submit scores even without changing the name to something more personal.
4. You can request for the scores and the achievements but you need to take care of displaying it in your preferred way. 


Thanks, Best Regards,


Posts: 99
Registered: ‎10-03-2009
My Device: Not Specified

Re: ScoreLoop

Building on Dimitry's comment - we recently posted a note on building BelligerentBlocks with the IDE and NDK 2 beta 3.  Belligerent Blocks only shows some simple portions of the Scoreloop API but the team will add more functionality in the near future.


  - eduard/o


Post at Open BB News: http://openbbnews.wordpress.com/2012/01/26/belligerent-blocks

Posts: 44
Registered: ‎01-06-2012
My Device: PlayBook

Re: ScoreLoop

Thank you for all the replies, I've put in some logic along the lines of:


1. Do ScoreLoop initialisation and request user information

2. Once user information has been retreived, set a flag, so the main loop can:

3. If it is the first time the game has been run (worked out from a save file) bring up a dialog prompt for the user to change their ScoreLoop name

4. Handle name change request (including error cases when username is already taken etc.)


This seems to work, I'm not sure if there is a better way to handle knowing if the user should change their name or not, it does not seem unreasonable to ask the user for their desired ScoreLoop name on first run of the game, but it would be better if I could do some sort of SC_User_UsingDefaultUsername( user ) to query if the user is still using the preallocated name. If this possible?


For achievements, I have implemented a custom view in the game to display them, and will do the same for leader boards at some point.


After using GameCenter (on iOS) I was just expecting (or maybe hoping is the better word here) that there would be standard components in place to handle usernames, scoreboards, awards. This way the user would have a consistent experience across all titles, and it also would mean each developer wouldn't have to implement very simliar code. On the flip side, I appreciate that doing a custom view does mean the awards/leader boards can be more tightly integrated into the game (although I do worry there will end up being little bugs not handling certain cases right with time outs etc.)


I will keep you posted if I have any more questions/thoughts.


Best regards,



BlackBerry Development Advisor
Posts: 24
Registered: ‎01-23-2012
My Device: BB Curve

Re: ScoreLoop



the steps you have outlined for the logic seems to be fine..  


Regarding querying if the user is using the default generated name or not.. Yes, currently we do not have an API and your suggestion seems to be a good one. I have passed on your inputs on this to the development team here for discussions. 


 About the UI - Many developers prefer to have their own UI to match with their game's look and feel and as you said something that is tightly integrated into the game. So.. we offer the Core APIs which provide the functionality and not the UI. Many developers on the other hand prefer easy integration and therefore the UI too.


Scoreloop has standard UI components on android and iOS. Generally, we have always started with Core APIs and then later on we have built the UI components.. (for iOS and Android too - first Core APIs and then UI). I agree, currently we do not have the UI components for QNX but as the first step we have Core APIs in place. We might be having the UI too but at this point in time, I am not in a state to commit anything as to if and when the UI components for QNX will be available. All I could say is - watch out for our updates.


In case of any further questions, please do get in touch..


Thanks !