pContext | | (optional with 0 default) Although the score and formatting
system allows you to create interesting leaderboards, you may want to
extend the leaderboard system to include other information specific to
your game. You do this using score contexts. A score has a context
property that holds a 64-bit integer. The value stored in this property
is stored along with the score. Game Center doesn’t use this value at
all, nor does it affect score formatting. Your game is free to use this
integer to store whatever information you want.ulliYou can use the
context property to store flags that provide additional content. For
example, in a racing game, you might use the flags to store what kind of
car the person completed the track with. Then, in your own custom
leaderboard user interface, you could display the appropriate car image
next to each score./liliYou could record the user’s actions and
other data into a file. You then design your game engine to be able to
replay the contents of that file. You store the file on your own server
and use the context field as an index to reference the file. Your custom
leaderboard user interface can then offer the ability to see exactly how
someone earned the score./liliYou could implement the replay
directly into your gameplay. For example, in the hypothetical racing
game, you use a player’s replay file to display a phantom car for the
current player to race against./li/ul
|