Skip to main content

Game System Overview

beginnerLast updated: 1/15/2024

Understanding how the game system works and how games relate to matches

Game System Overview

The game system automatically creates game slots when matches are created and allows you to import games individually from Riot's API.

How Games Work

Games vs Matches

  • Match: A competition between two teams (e.g., "Team A vs Team B")
  • Game: An individual League of Legends game within a match

For example:

  • A Best of 3 match has 3 game slots
  • Each game is a separate League of Legends match
  • Games are imported one at a time as they finish

Automatic Game Creation

When you create a match, the system automatically creates game slots based on the best_of value:

  • Best of 1: 1 game slot
  • Best of 3: 3 game slots
  • Best of 5: 5 game slots
  • Best of 7: 7 game slots

Each game slot is created with:

  • A unique game number (1, 2, 3, etc.)
  • A pending state
  • A unique tournament code (if tournament is linked to Riot)

Game States

Games can have one of four states:

Pending (Yellow)

  • Game hasn't been played yet
  • Ready to be imported
  • Shows in admin UI with "Import Game" button

Completed (Green)

  • Game has been imported from Riot's API
  • Contains full statistics and participant data
  • Match score is updated based on game result

Skipped (Gray)

  • Game was not needed (match ended early)
  • Automatically marked when match completes
  • Cannot be imported

In Progress (Blue)

  • Game is currently being played
  • Rarely used, mostly for manual tracking

Tournament Codes

Each game has its own unique tournament code:

  • Generated automatically when games are created (if tournament is linked to Riot)
  • Used to link games to Riot's tournament system
  • Displayed in the admin UI for reference

Importing Games

Games can be imported individually:

  1. Navigate to Match Management
  2. Expand the match to see all games
  3. Click "Import Game" for the game you want to import
  4. Enter the Riot Game ID and region
  5. Game data is fetched and stored

See Importing Games for detailed instructions.

Auto-Skip Unused Games

When a match completes early (e.g., a team wins 2-0 in a Best of 3), the system automatically:

  1. Marks the match as "Completed"
  2. Marks all remaining pending games as "Skipped"
  3. Prevents those games from being imported

This ensures you don't accidentally import games that weren't needed.

Match Completion Logic

A match is considered complete when a team reaches the required number of wins:

  • Best of 1: 1 win needed
  • Best of 3: 2 wins needed
  • Best of 5: 3 wins needed
  • Best of 7: 4 wins needed

Once a team reaches the required wins, the match is automatically marked as "Completed" and remaining games are skipped.

Riot Callback Integration

If you have Riot webhooks configured, games can be imported automatically:

  • When a game finishes, Riot sends a callback to your server
  • The system finds the correct game slot (by tournament code or game number)
  • The game is automatically imported and marked as "Completed"
  • Match completion is checked and unused games are skipped

Benefits

The game system provides:

  1. Better Organization: Each game is tracked individually with its own data
  2. Clearer Progress: You can see exactly which games have been played
  3. Automatic Management: Unused games are automatically handled
  4. Individual Control: Import games one at a time as they finish
  5. Better Data: Each game has its own statistics and participant data

Next Steps

Tags:game-managementmatchesriotoverview

Was this article helpful?