Skip to main content

Benchmarking Multiplayer Performance

Key Problem

  • Should understand what are the key factor to be benchmarked for multiplayer
    • Network tick rate (# per second)
    • Incoming/outgoing data size per session (# Mb per 1 session)
    • Should understand how to profile the key factor

Expected Output/Definition of Done

UploadAble Into Progressshow the key factors

Key Solution

Fusion Stats

Untitled

After adding Fusion Stats we can customize the graphs shown while the game is being run.

Untitled

These options can be found from the Inspector of the FusionStats game object.


NetworkRunner.Simulation.Statistics

We can also access the data where FusionStats is also taking from, through code, that is by accessing current NetworkRunner’s Simulation.Statistics. ****From there we can get specific data that we need to see and show as we want to. Processing the data can take references from FusionGraph.cs (which is part of the FusionStats).

Untitled

Regarding Network Tick Rate

Network tick rate is dependent on the game, for an action pc game 60 tick rate is the standard minimum, for mobile it’s best to be kept at 30-45.

Having higher tick rate means more data is being sent every second. We can check what tick rate is currently being set in the specific client through current runner: NetworkRunner.Config.Simulation.TickRate.

Host and Client can run in different tick rates, although it is better not to do so to prevent potential errors.

  • When client with lower tick rate joining the host with higher tick rate, the movement of the client who joined will seem laggy in the host side.
  • Meanwhile when client with higher tick rate joining the host with lower tick rate, errors might show up because the host is receiving more data than it should be from the client who joined.