window.Totem
window.Totem is frozen. Do not replace it or add properties.
gameOver({ score })
Call this once when a run ends.
An invalid score is ignored and writes one console warning. A valid call records a
game_over event and asks the Totem shell to submit the score for the current player. Another call made within two seconds is silently ignored.
The shell can reject a score above the game’s configured maximum or more than one score from the same player and game within ten seconds. The game-over screen still keeps Play again available.
event(name, props)
Record a game-specific custom event.
name must contain 1–64 characters. The SDK accepts up to 10 custom events per rolling minute.
props must be a plain JSON-serializable object whose serialized form is at most 1,024 characters. If props are missing, malformed, circular, or too large, Totem drops the props but still sends the named event. Do not include secrets or direct personal information.