itch.io is community of indie game creators and players

Devlogs

Recap of multi and single player architecture - Unity 2019.4 (2/4)

ScionSky
A downloadable game for Windows

In the last post, the messaging architecture was shown, with data structure compressed binary messaged being thrown around between the server and clients.

In this post we'll illustrate how this all lays out in a Unity scene using "Physics Scenes".  Physics scenes let you manually control the time step, instead of automatically through the Unity engine.  This is necessary because sometimes in a multi player game if a player fires a sniper rifle, for example, at 30ms lag, the server will receive the fire command that much after it occurs on the client.  Servers then store a history of the game and "rewind" to the estimated firing time in the server's timeframe, check for damage, and then fast forward back to the original.

For single player, we hijack the messaging and consumption architecture but instead of calling the steam data send methods, we simply invoke the data receive on the server or client using direct references.

This is what it looks like.

Files

  • ScionSky_WinX64_05Feb2025.zip 980 MB
    Feb 05, 2025
Download ScionSky
Leave a comment