Skip to content
On this page

Score Configuration

Each type of score for your game can be configured individually. Expressed in JSON, a score configuration is in the following format:

{
  game: string,
  name: string,
  level_key: string,
  value_name: string,
  value_type: string,
  value_formatter: string,
  order: number,
  reverse: Boolean,
  mode: string
}
attributetypedescription
gamestringAPI key of your game
namestringDisplay name for the score e.g. 'Level 1'
level_keystringReference key for this level e.g. 'level1'
value_namestring?Name for the score values e.g. 'Fastest Time'
value_typestring?The type of value (number, time)
value_formatterstring?The type of formatter to use for this value (see Formatters)
ordernumber?The display order of this level
reverseboolean?If true, minimum score values are used for API score calculations
modestring?Scores with mode of first will only display the first score for a day in the leaderboards

These configurations are loaded into our highscore system to facilitate the specific needs of each type of score for your game.

Formatters

Define a value_formatter in score configuration or as a parameter in api methods to format values.

Number Formatters

No special number formatters are currently available. Let us know if there is a format you'd like to see.

Time Formatters

If using the time formatter you should submit your scores in milliseconds.

formatterexample output
default00:01:05.5
shortDuration1m 5.5s
longDuration1 minute, 5.5 seconds
seconds65.5s
ms65500