SubmitSharedScore board$,player,score#

Parameters

board$ - the board, up to 64 bytes of text, such as the level's key from SharedRoomKey()

player - the player who scored, a SharedPlayerID

score# - their score, such as a time in seconds

Description

Posts a player's score to a board of the room's day.

Only a server room's server posts scores. The server runs the game and measures the score itself, so nobody can post a faked one: when a player reaches the goal, call SubmitSharedScore SharedRoomKey(), player, time#. Each player keeps their best of the day on each board. The board's order comes from b3d-shared-world.json: "board": "lowest" makes the lowest score best, as for a time, and otherwise the highest is.

Players are known on boards by an identity their own copy keeps for your game, so their best stays theirs from one run to the next, and by the name they play under, cut to 24 characters. A score goes to the boards of the day its room started, so a run that began before midnight counts for that day.

A player's scores on one board are at least 5 seconds apart, bots have no place on the boards, and a game has at most 32 boards a day. A refused score sets SharedWorldError(), which says why; the service's answer can come a moment later. Boards are kept for 30 days. Only rooms the game servers run post to your game's boards: an online test's room keeps a board of its own while it lasts, which its players' QuerySharedGame shows.

For the full story - room keys, the day's choices and boards - see the Shared World guide.


See also: SharedBoardCount, SharedBoardPlace, SharedRoomKey, QuerySharedGame, SharedPlayerBot.

Index