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.
Here’s a quick cheat sheet for the network system, to get you started.
Networking.CreateLobby( new LobbyConfig()
{
MaxPlayers = 8,
Privacy = LobbyPrivacy.Public,
Name = "My Lobby Name"
} );
list = await Networking.QueryLobbies();
Networking.Connect( lobbyId );
go.Destroy();
var go = PlayerPrefab.Clone( SpawnPoint.Transform.World );
go.NetworkSpawn();
[Rpc.Broadcast]
public void OnJump()
{
Log.Info( $"{this} Has Jumped!" );
}