How Multiplayer Works
Nitrox uses a client-server architecture where one player hosts a dedicated server and others connect to it.Server
Runs the game world and manages all game state, entity spawning, and player coordination
Clients
Connect to the server and send/receive updates about player actions and world changes
Connection Flow
When a player connects to a Nitrox server, the following sequence occurs:Session Reservation
Player requests a slot on the server with their username and settingsThe server validates:
- Player capacity hasn’t been reached
- Password is correct (if required)
- Username is valid (3-25 alphanumeric characters)
Initial Sync
Server sends the complete world state to the joining player, including:
- All entities and their positions
- Other connected players
- World data and story progression
- Base structures
The initial sync process has a configurable timeout (default: 120 seconds) defined in
SubnauticaServerConfig.cs:12.Player Synchronization
Each player’s state is continuously synchronized across all clients.Movement Synchronization
Player position and rotation are broadcast using unreliable sequenced packets for optimal performance:PlayerMovement packet uses UNRELIABLE_SEQUENCED delivery for low latency at the cost of potential packet loss.
Player Stats Synchronization
Vital statistics are synchronized reliably:Synchronized Player Properties
Synchronized Player Properties
- Position & Rotation: Body and aiming orientation
- Velocity: Movement speed for animation
- Health: Current and maximum HP
- Oxygen: Current and maximum O2
- Food & Water: Hunger and thirst levels
- Infection: Kharaa bacterium infection progress
- Equipment: Held items and visible equipment
- Animations: Swimming, walking, vehicle states
- Location Context: Current vehicle, base, or escape pod
Remote Player Representation
Remote players are fully rendered with:- 3D character models with animations
- Equipment visibility (tools, tanks, etc.)
- Health and infection visual effects
- Creature targeting (remote players can be attacked)
- Collision detection for building
Session Management
Player Capacity
The maximum number of players is configurable inserver.cfg:
Player Identification
Each player receives a uniquePlayerId (ushort) when they first join:
Connection States
Players progress through connection stages tracked byMultiplayerSessionConnectionStage:
DISCONNECTED: Not connected to any serverESTABLISHING_SERVER_POLICY: Requesting server settingsSESSION_RESERVED: Slot reserved, awaiting world dataSESSION_JOINED: Fully connected and in-game
Limitations
No Host Migration
If the server shuts down, all players are disconnected. The session cannot be transferred to another player.
Save File Management
Only the server manages world saves. Clients do not save world state locally.
Version Compatibility
All players must use the exact same Nitrox version (major.minor) as the server.
Password Protected
Servers can require passwords. Admin commands require a separate admin password.
Performance Considerations
- Initial sync time increases with world complexity (bases, vehicles, creatures)
- Network bandwidth scales with active player count
- Server hardware must handle all simulation and entity management
- Entity cache can be pre-built to improve player joining performance (see
CreateFullEntityCachein server.cfg)
Player Permissions
Nitrox implements a permission system with four levels:LocalhostIsAdmin in server.cfg).
Related Pages
Synchronization
Learn how entities, vehicles, and bases are synchronized
World Management
Understand save files and world persistence
Communication
In-game chat and command system
