SC_Award

The SC_Award class models an award that is available in a game application.

You must configure awards on the Scoreloop developer website at https://developer.scoreloop.com , where you can specify or edit each of the individual properties for the following class.

Note that instances of Award are not created directly, but rather are specified declaratively in the Scoreloop-generated awards bundle.

Once an award is configured on the website, Scoreloop generates an awards bundle, which unzipped must be added to the game project. The awards bundle provides local access to the individual properties like:

  • The identifier

  • The initial value of the award (which is any number)

  • The achieving value of the award (which is any number, greater or equal to initial value)

  • The reward

  • The title and description

  • The image names for both states (unachieved and achieved)

Awards are static. You can only query the information defined in an award bundle. Then build a screen based on them. Something that makes them alive are achievements. Achievement describes if and when user gained an award.

Users unlock an award by meeting a certain value that is set inside the bundle. This is defined as the achieving value for the award. You can configure awards so that this value can be reached in incremental stages, if desired. The number of incremental stages is defined by subtraction: SC_Award_GetAchievingValue() - SC_Award_GetInitialValue() .

For example, you might configure an award that has the following properties:

  • Initial value: 0, that is, the starting value.

  • Achieving value: 10,

  • Then the expected progress tracked by an achievement must fall into range: (0,10), that gives 10 incremental stages.

When the game is played, this might mean that the user must collect 10 secret jewels in order to unlock the award. Before the user finds the first jewel the following is true:

  • Initial value = 0.

With each jewel found, the value could be increases by 1. When the number of jewels found equals the achieving value then the current user achieves the award.

To actually be able to invoke it from inside the game, you use the award identifiers. It is the reverse DNS style name, that could be used against an AchievementsController to localize the proper object and invoke and increment on it.

The Achievement class is used to manage the incremental increases in value and to keep track of whether or not an award has been achieved.

See SC_Achievement and SC_AchievementsController for the correct use.

See also:

SC_Achievement , SC_AchievementsController , Awards and Achievements