Skip to content

Networking

Lumina uses a server-authoritative model. The server owns the simulation and clients receive replicated state. World.Net tells a script which side it is running on.

if (World.Net.IsServer)
{
// authoritative-only logic
}
if (World.Net.IsClient)
{
// client-only logic (prediction, presentation)
}
MemberReturns
World.Net.ModeThe ENetMode, one of Standalone, Client, ListenServer, or DedicatedServer
World.Net.IsServertrue on a listen or dedicated server (the authority)
World.Net.IsClienttrue on a connected client
World.Net.IsStandalonetrue when the world isn’t networked
World.Net.IsNetworkedtrue when running as a client or server
World.Net.ConnectedClientsServer-side count of connected clients (0 elsewhere)

A common pattern is to gate authoritative logic behind IsServer and run presentation everywhere.

public override void OnUpdate(float DeltaTime)
{
if (World.Net.IsServer)
{
StepSimulation(DeltaTime);
}
UpdateVisuals(); // runs on server and clients
}

State replication is configured on the native side. A C++ component property marked PROPERTY(Replicated) is collected on the server and applied on clients, where the change drives the registry’s on_update signal. From a script you can observe those applied changes with Registry.OnUpdate<T> on the replicated component type. Authoring replicated state and RPCs directly in C# is not yet exposed. See the engine’s networking documentation for the native workflow.