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

Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.

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

Inside this diagram

A sequence diagram with 5 participants and 10 messages, in the order they happen.

People

  • Player

Systems

  • Game Client
  • Matchmaking Service
  • Server Allocator
  • Game Server

Steps in order

  • 1. Player โ†’ Game Client: Click Play
  • 2. Game Client โ†’ Matchmaking Service: Ticket: rating 1450, region ap-south
  • 3. Matchmaking Service โ†’ Matchmaking Service: Match by rating and region
  • 4. Matchmaking Service โ†’ Server Allocator: Allocate server in ap-south
  • 5. Server Allocator โ†’ Game Server: Start match instance
  • 6. Game Server โ†’ Server Allocator: Ready at 10.2.3.4:7777 (reply)
  • 7. Server Allocator โ†’ Matchmaking Service: Server address (reply)
  • 8. Matchmaking Service โ†’ Game Client: Match found, address and join token (reply)
  • 9. Game Client โ†’ Game Server: Connect with token (UDP)
  • 10. Game Server โ†’ Game Client: Match starting (reply)

Conditions and loops

  • Repeats: Until 10 players found

Make your own diagram like this

Describe your own system in plain English and the AI sequence diagram generator draws it in seconds, in the same style as this template.

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.