Skip to main content

Dedicated Game Server Orchestration 101

✍ Last Updated : September 15, 2022

🚪 Prequisite Knowledge (Optional)

  1. [Multiplayer](Multiplayer d1696212dbf84eb195595d64a62cef83.md)
  2. [Automated Deployment (Kubernetes)](Automated Deployment (Kubernetes)%20e12cc90f456843c3ad3db174ebc83066.md)

❓ Key Question / Problem / Issue

  1. How to deploy headless build into the cloud ?
  2. how to managed multiple headless build session ?
  3. how to start headless build in cloud server on user demand ?

✅ Expected Output/Definition of Done

  1. Basic Guideline explaining Information on Multiplayer Dedicated Game Server Orchestration and Mechanism

🎁 Resulting Solution

UploadGoogleForGames

Flowchart Maker & Online Diagram Software

Conceptual Diagrams

Dedicated Game Server Core Components

In ProgressOrder to setup Dedicated Game Server Orchestration Service we would need 3 Core component to begin with :

  1. Headless Game Application Image
  2. Allocation API
  3. platform (service / infrastructure), for deploying, hosting, scaling, and orchestrating dedicated game servers for large scale multiplayer games (Agones) later called (DGS Service)

Untitled

Headless Game Application

  1. Headless Game Session is a game application that launched in headless mode with the purpose of game rule, logic, loop, physics, simulation in realtime and synchronized with player game client.
  2. In Photon Fusion - Unity use case this headless game application is the same unity project that developed as game client.
    1. the difference between fusion client, and fusion headless game is they have different application loop.
      1. fusion client application loop involve player input to operate
      2. fusion headless application loop doesn’t involve player input. but direct API / RPC, and multiplayer protocol to communicate with client (handled by fusion), and game server allocation service (agones)
    2. additionally fusion headless game build platform target will be targeted toward easily virtualized / containerized image, for easy deployment and execution in either local / cloud environment.
  3. Headless Game Application will need to communicate with dedicated game allocation service to inform their state, in order for DGS service properly allocate, orchestrate, load balance, etc2

DGS (Dedicated Game Server Headless Instance Management) Service

  1. DGS Service is an service / abstraction of multiple service that handles multiple dedicated game server orchestration, management, deployment, scaling, etc2
  2. Example of DGS Service :
    1. Self Deployed / Managed
      1. Agones
    2. Third-Party Subscription Service
      1. Playfab Multiplayer
      2. Amazon Game Lift
      3. Epic Online Service - Session Interfaces
      4. Edge Gap
  3. It is self sufficient and independent of any other service
  4. to utilize and start using it you will need :
    1. Headless Game App Image / executable with DGS SDK implemented, and it’s deployment configuration
    2. service / application that access it’s API to request, and matchmake a sessions

Session Director / Matchmaking API

  1. Serve as communication layer that limits user to freely access agones API
  2. will have custom / generic rule to calculate / group multiple player together
  3. will use agones api to get and allocate a server to be used by multiple player to connect in a single game session.
  4. will communicate with game client app to inform about allocated game server for the client to connect

Open Match

Example Self Managed Matchmaking Service

Simplified App Relations

Untitled

Common Dedicated Game Server Life Cycle

Buffer Session Orchestration (Preparing Warm Live Session)

Untitled

Requesting Warm Live Session to use with game Session

Untitled

  • Sequence Diagram Script

    title Requesting Session
    
    participant Game Client
    participant MM / Director API
    participant "Dedicated Game Server Service\n(Agones)" as DGS Service (Agones)
    participant Headless
    
    activate Headless
    note over Headless: Ready
    
    activate Game Client
    space
    
    note over Game Client:requesting / waiting game session data
    space 
    Game Client->MM / Director API:request a game session
    activate MM / Director API
    space 
    note over MM / Director API:Calculating / applying Matchmaking Rule 
    MM / Director API->DGS Service (Agones):requesting existing / correlated session data
    
    MM / Director API<-DGS Service (Agones):Corresponding session data response
    Game Client<-MM / Director API:If No Corresponding Session Found
    note left of Game Client:stop if matchmaking failed
    space 
    deactivate MM / Director API
    activate MM / Director API
    
    deactivate Headless
    
    space 
    
    note over MM / Director API:Allocation Request with Session Information
    MM / Director API->DGS Service (Agones):Game Session Allocation Request
    DGS Service (Agones)->Headless:Inform Allocation State with Session Information\n\ne.g { Level :  A, Game Rule : X, Assigned Player: [John, Bob, Jane]}
    activate Headless
    MM / Director API<-DGS Service (Agones):response allocation successful
    note over Headless: Allocated
    
    deactivate MM / Director API
    Game Client<-MM / Director API:response game session data to connect
    space 
    deactivate Game Client
    
    space 
    
    activate Game Client
    note over Game Client: Multiplayer Game Session
    
    Game Client->Headless:Connect to Corresponding Headless Session
    

Where to Go From Here ?

  1. [Agones](Agones a9782a164f514f0e8541ce619fc49a5a.md) Our Known Dedicated Server Management.