Networking & Multiplayer
The networking system in s&box is purposefully simple and easy. Our initial aim isn't to provide a bullet proof server-authoritative networking system. Our aim is to provide a system that is really easy to use and understand.
The networking system in s&box is purposefully simple and easy. Our initial aim isn't to provide a bullet proof server-authoritative networking system. Our aim is to provide a system that is really easy to use and understand.
Overview
Here's a quick cheat sheet for the network system, to get you started.
Create a new lobby
Networking.CreateLobby( new LobbyConfig()
{
MaxPlayers = 8,
Privacy = LobbyPrivacy.Public,
Name = "My Lobby Name"
} );
List all available lobbies
list = await Networking.QueryLobbies();
Join an existing lobby
Networking.Connect( lobbyId );
Enable GameObject Networking

Destroy Networked GameObject
go.Destroy();
Instantiating a Networked GameObject
var go = PlayerPrefab.Clone( SpawnPoint.Transform.World );
go.NetworkSpawn();
RPCs
[Rpc.Broadcast]
public void OnJump()
{
Log.Info( $"{this} Has Jumped!" );
}
Referenced API
Canonical API pages mentioned in this guide.
No summary available.
No summary available.
Global manager to hold and tick the singleton instance of NetworkSystem.
No summary available.
Dictates where players will spawn when they join the game when using a NetworkHelper.
Will create a new lobby with the specified `Sandbox.Network.LobbyConfig` to customize the lobby further.
Will create a new lobby.
No summary available.