Skip to main content
The BoofState type represents the complete state of the tournament overlay, including all game information, player data, and real-time Slippi connection status.

Type Definition

type BoofState = {
    // --- game state ---
    tournament: Tournament,
    player1: Player,
    player2: Player,
    commentators: Commentator[],
    activeSet?: BoofSet,
    lastPlayer1Score: number,
    lastPlayer2Score: number,
    started: boolean,
    // --- slippi ---
    slippi?: Slippi,
    slippiConnected: boolean,
    obsConnected: boolean,
}

Fields

tournament
Tournament
required
Tournament information including name, match identifier, phase, and best-of format
player1
Player
required
Player 1 data including name, sponsor, score, character, and metadata
player2
Player
required
Player 2 data including name, sponsor, score, character, and metadata
commentators
Commentator[]
required
Array of commentators for the current match. Each commentator has:
  • id (number) - Unique identifier
  • name (string) - Display name
  • sponsor (string) - Team/sponsor tag
  • pronouns (string) - Preferred pronouns
  • twitter (string) - Twitter handle
activeSet
BoofSet
The currently active set from start.gg, if available
lastPlayer1Score
number
required
The last recorded score for player 1
lastPlayer2Score
number
required
The last recorded score for player 2
started
boolean
required
Whether the tournament stream has started
slippi
Slippi
Real-time Slippi game data including port assignments, characters, stocks, stage, and game results history. See the Slippi type fields below for full details.
slippiConnected
boolean
required
Whether the Slippi connection is currently active
obsConnected
boolean
required
Whether the OBS WebSocket connection is currently active

Slippi Type

The Slippi type contains real-time game data from the Slippi connection:
type Slippi = {
    port1: number,
    port2: number,
    character1: Character,
    character2: Character,
    characterColor1: CharacterColor,
    characterColor2: CharacterColor,
    stocksRemaining1: number,
    stocksRemaining2: number,
    player1IsPort1?: boolean,
    gameResults: GameResult[],
    gameStartTimeUnix?: number,
    stage?: MeleeStage,
}
port1
number
Controller port for the first detected player (1-4)
port2
number
Controller port for the second detected player (1-4)
character1
Character
Character ID for port 1 player
character2
Character
Character ID for port 2 player
characterColor1
CharacterColor
Costume color for port 1 player
characterColor2
CharacterColor
Costume color for port 2 player
stocksRemaining1
number
Remaining stocks for port 1 player in current game
stocksRemaining2
number
Remaining stocks for port 2 player in current game
player1IsPort1
boolean
Whether player 1 is on port 1 (undefined until port matching is done)
gameResults
GameResult[]
Array of completed games in the set, each containing stage, winner, characters, stocks remaining, and duration
gameStartTimeUnix
number
Unix timestamp when the current game started
stage
MeleeStage
Current stage ID (see Character enum for all stage IDs)

Build docs developers (and LLMs) love