Multiplayer | Discussion on client-server model and game instance design

Actual questions

  • How would you handle communication between multiple dedicated servers?
    If they are instances, they don’t need communication except loading players inventory and other stats when he logs in from API / database
  • What scalable services would you use (self-hosted /AWS/GC)
    Cloud hosting, kubernetes, like any load dependent web app
  • How would you handle redundancy? (server-down)
    Didn’t get the question. If server is not working, it should be down. Still task for kuber
  • How would you handle persistent data (storing player data regardless of game instances)
    Same as first question, db

About large number of players

My experience: I wanted my shooter to support thousands of players on the same map, but ofc I started working on the game itself before diving into that task, although from the start trying to do everything possible to be able to scale the game later (using Lyra-style animation blueprints with multi thread support, trying to optimize network bandwith and the game performance, etc.)

Results:

  1. I got about 5K people on my discord server, but maximum amount of players in one match never was more than 50. After several months after the game launch, I get 16-30 people in planned matches on the weekends. Here I give a hit that even you build a game that supports 1K players, it’s not sure you’ll be able to test it.
  2. With 16 people ping from dedicated server (in the cloud) for people in the same city is 30 ms, but with 30 people it goes to 100 ms, and it’s less comfortable to play.

To be able to support more players, you can achieve it by:

  1. Reducing the amount of replicated data in second: Gameplay Ability System - Advanced Network Optimizations - Devtricks
  2. Moving “hard calculations” to the client side, like in planetside. Clients telling server that they hit the target while shooting (standard Lyra behaviour), client auth movement (like mmos), …, then fight insane amount of cheaters

Also some scalability calculations:

  1. Network (Server)
    With 30 people in the match and me hosting it, in my Lyra-based shooter I had average 300 kB/s bandwith load, most of it replicated movement and montages.
    As it scales in square (number of players to replicate to, number of properties to replicate), 200 people would take 13 MB/s. Still possible for server. Now paste 1000 in
    (n / 30) ^2 * 300
  2. CPU, RAM (Server)
    Didn’t measure it too much, but I hope it doesn’t increase faster than N. Also some initial part of it is reserved for the engine itself ofc. 1 CPU, 2 GB were enough for 30 players for me and still had free space.
  3. FPS (Client)
    Can make several hundreds low poly models with multi threaded ABP and don’t worry about them I guess. But I didn’t check too much.

Final resolution: Fornite made 200 people in match with heavy GAS network optimizations, I guess you could do that too with professional team.