Skip to main content

Scheduled Tournament Format

Scheduled tournaments are created by the Casino System with a specific start time and start automatically when that time arrives, regardless of player count. This format is ideal for planned events, marketing campaigns, and fixed-time competitions.

Key Characteristics

Scheduled tournaments use 100% existing APIs - no new development required. All functionality is already implemented and tested.
  • Pre-creation: Tournament created before players register
  • Time-based Start: Tournament starts at scheduled time regardless of player count
  • Standard Registration: Players register in advance using standard external APIs
  • Immediate or Scheduled: Can start immediately if startTime <= now() or be scheduled for future

Architecture Overview

Key Principle: Casino System creates tournament with specific startTime. Tournament System starts tournament automatically when scheduled time arrives.

Format-Specific Features

  • Pre-creation: Tournament created before players register
  • Time-based Start: Tournament starts at scheduled time regardless of player count
  • Standard Registration: Players register in advance using standard APIs

Tournament Flow

Format-Specific APIs

Tournament Creation

POST /api/tournaments
Header: X-API-Key: {operator_key}
Content-Type: application/json

{
  "name": "Daily Championship", 
  "startTime": "2024-01-15T20:00:00Z",
  "endTime": "2024-01-15T21:30:00Z", 
  "gameSlug": "crash-classic",
  "maxPlayers": 100,
  "minPlayers": 10,
  "entryFee": 10.00,
  "prizePool": {
    "type": "percentage",
    "distribution": [50, 30, 20]
  },
  "rebuyEnabled": true,
  "rebuyFee": 10.00,
  "maxEntriesPerPlayer": 3
}
Response:
{
  "tournamentId": 12345,
  "status": "scheduled", 
  "scheduledStart": "2024-01-15T20:00:00Z",
  "roomId": null,
  "gameUrl": null
}

Tournament Start Logic

The Tournament System handles start logic automatically:
When startTime <= now():
  1. Tournament starts immediately upon creation
  2. Status set to active
  3. Game room created via Game Platform
  4. SQS event tournament.started sent
  5. Players can register and join immediately

Player Registration Flow

Players register using the standard external API flow:

1. Player Registration

POST /api/tournaments/12345/players
Header: X-API-Key: {operator_key}
Content-Type: application/json

{
  "userId": "player_123",
  "displayName": "PlayerName",
  "buyInAmount": 10.00
}

2. JWT Token & Game URL

{
  "playerId": "tp_player_456",
  "jwtToken": "eyJ0eXAi...",
  "gameUrl": "https://game.platform.com/room/abc123?token=eyJ0eXAi...",
  "roomUrl": "https://game.platform.com/room/abc123",
  "tournamentStatus": "scheduled|active"
}

3. Game Launch

  • If tournament is scheduled: Player waits for scheduled start time
  • If tournament is active: Player can join game room immediately
  • Game Platform: Validates JWT and connects player to tournament room

Shared Common Flows

After tournament creation and start logic, scheduled tournaments use identical flows as hop-on/off tournaments:

Architecture Benefits

Time-based Reliability

  • Tournaments start precisely at scheduled time
  • Consistent experience for planned events
  • Marketing campaigns can rely on exact timing

Pre-registration Support

  • Players can register before tournament starts
  • Build anticipation and ensure participation
  • Better capacity planning and resource allocation

Proven Infrastructure

  • 100% existing APIs: Uses current scheduled tournament system
  • Comprehensive Testing: All functionality already tested and proven
  • Shared Functionality: All gameplay, events, and player management uses common flows
  • No New Development: Ready to deploy immediately

Use Cases

Ideal for:
  • 🎯 Marketing Events: Promotional tournaments with specific timing
  • 📅 Regular Schedules: Daily/weekly tournaments at consistent times
  • 🏆 Championship Events: High-stakes tournaments requiring coordination
  • 📈 Capacity Planning: Predictable load patterns for infrastructure scaling
Example Scenarios:
  • Daily 8 PM championships with email notifications
  • Weekend special events with increased prize pools
  • Seasonal tournaments aligned with game releases
  • Corporate events with specific timing requirements

Next Steps

Hop-On/Off Tournaments

Learn about the player-count based tournament format for continuous availability.