CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Gaming

🎮 Gaming · Sequence

Game Matchmaking Sequence

How a player gets into a match: joining the queue, skill-based matching, server allocation and connecting to the game server.

More Gaming templates

Drawing diagram…

What this diagram shows

  • Players are matched on skill rating and region
  • Search widens the skill range the longer a player waits
  • Game server is allocated only when a full match is found

Prompt used

Matchmaking sequence: the player clicks Play, the game client sends a ticket with skill rating and region to the matchmaking service, which groups 10 players with similar ratings (widening the range after 30 seconds of waiting). When a match is found it asks the server allocator for a dedicated game server in the nearest region, receives the server address and a join token, sends them to all players, and the clients connect to the game server over UDP.

Mermaid code
sequenceDiagram
  actor P as Player
  participant C as Game Client
  participant MM as Matchmaking Service
  participant AL as Server Allocator
  participant GS as Game Server
  P->>C: Click Play
  C->>MM: Ticket: rating 1450, region ap-south
  loop Until 10 players found
    MM->>MM: Match by rating and region
    Note over MM: Widen rating range after 30s
  end
  MM->>AL: Allocate server in ap-south
  AL->>GS: Start match instance
  GS-->>AL: Ready at 10.2.3.4:7777
  AL-->>MM: Server address
  MM-->>C: Match found, address and join token
  C->>GS: Connect with token (UDP)
  GS-->>C: Match starting

Related templates

C4 ArchitectureProGaming

Multiplayer Game Backend Architecture

The backend for an online multiplayer game: player accounts, matchmaking, dedicated game servers, leaderboards and in-game purchases.

State MachineGaming

Multiplayer Game Session States

The states of an online match on a game server: lobby, loading, in progress, pauses, reconnects and results.

Data FlowGaming

Game Leaderboard Data Pipeline

How match results turn into leaderboards and rankings: result events, anti-cheat checks, rating updates and cached leaderboards.

DeploymentProGaming

Global Game Server Deployment

How an online game runs servers close to players worldwide: regional fleets, a global matchmaker, and central account and store services.

FlowchartGaming

In-App Purchase Flow

How an in-game purchase is completed safely: store purchase, receipt validation on the server, granting items and handling refunds.

Database ERDGaming

Game Player and Inventory Schema

Tables for an online game: players, characters, items, inventories, currencies, purchases and match history.