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

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 --> [*]

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.