CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
๐ŸŒ™โ˜€๏ธ
Log inStart free
Home/Templates/Gaming

๐ŸŽฎ Gaming ยท State Machine

Multiplayer Game Session States

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

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

  • Match starts only when all players have loaded
  • Disconnected players get a window to reconnect
  • Results are submitted before the server shuts down

Prompt used

State machine for a multiplayer game session: Allocated, Lobby waiting for players, Loading, Countdown, In Progress. A disconnected player causes Waiting For Reconnect (90 seconds); if they return the match resumes, otherwise a bot replaces them. Match end moves to Results, Submitting Results to the backend, then Shutdown. If too few players load the match is Cancelled.

Mermaid code
stateDiagram-v2
  [*] --> Allocated
  Allocated --> Lobby
  Lobby --> Loading: All players joined
  Lobby --> Cancelled: Timeout, too few players
  Loading --> Countdown: All loaded
  Countdown --> InProgress
  InProgress --> WaitingForReconnect: Player disconnected
  WaitingForReconnect --> InProgress: Reconnected
  WaitingForReconnect --> InProgress: 90s passed, bot replaces
  InProgress --> Results: Match ends
  Results --> SubmittingResults
  SubmittingResults --> Shutdown
  Cancelled --> Shutdown
  Shutdown --> [*]

Inside this diagram

A state diagram with 10 states and 12 transitions.

States

  • Allocated
  • Lobby
  • Loading
  • Cancelled
  • Countdown
  • InProgress
  • WaitingForReconnect
  • Results
  • SubmittingResults
  • Shutdown

Starts in

  • Allocated

Ends in

  • Shutdown

Transitions

  • Allocated โ†’ Lobby
  • Lobby โ†’ Loading when All players joined
  • Lobby โ†’ Cancelled when Timeout, too few players
  • Loading โ†’ Countdown when All loaded
  • Countdown โ†’ InProgress
  • InProgress โ†’ WaitingForReconnect when Player disconnected
  • WaitingForReconnect โ†’ InProgress when Reconnected
  • WaitingForReconnect โ†’ InProgress when 90s passed, bot replaces
  • InProgress โ†’ Results when Match ends
  • Results โ†’ SubmittingResults
  • SubmittingResults โ†’ Shutdown
  • Cancelled โ†’ Shutdown

Make your own diagram like this

Describe your own system in plain English and CloudSketch AI draws it in seconds. See all AI diagram generators.

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.

SequenceGaming

Game Matchmaking Sequence

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

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.