WebSockets: External Server Communication with Auth Token Support
s&box allows WebSocket connections to interface with external servers. Common uses include custom networking and persistent data storage outside the local files…
Stats API
Track player statistics with the Stats service. Recording Stats Reading Stats Stat Types Batching Stats are automatically batched and sent periodically. Call as…
GameManager.Spawn RPC with Ident Parsing
GameManager.Spawn RPC Broadcast RPC for spawning entities from string identifiers with automatic weapon pickup detection. Ident Format - Spawn a prop from asset…
Auth Tokens - s&box Services Documentation
Auth Tokens Auth tokens allow your game to authenticate players with external backends. The token proves the player's identity and can be validated against Face…
Sandbox: UndoSystem — per-player undo stack with bounded history (128 steps)
UndoSystem — Per-Player Undo Stack The is a that maintains a per-player undo stack. Each entry holds a set of s that get destroyed when the undo is triggered. U…
Sandbox.Json
Sandbox.Json JSON serialization utilities. Overview Json provides methods for serializing objects to JSON and parsing JSON strings. Serialize Deserialize Parse …
Leaderboards API
Implement leaderboards using s&box Services API. Submitting Scores Reading Leaderboards Leaderboard Entry Properties Web API Access Query leaderboards from exte…
Sandbox: LimitsSystem — server-side per-player spawn and tool limits via ConVars
LimitsSystem — Server-Side Spawn and Tool Limits is a that enforces configurable per-player limits on props, constraints, and tool entities. It listens to and .…
WebSockets
Use WebSockets for real-time communication with external servers. Basic Setup With Auth Token Common Use Cases Custom networking — External matchmaking, chat se…
CleanupSystem: Map reset and baseline restoration
CleanupSystem: Map Reset and Baseline Restoration This example shows the CleanupSystem which tracks the baseline scene state and allows resetting the map to its…
Sandbox: ControlSystem — vehicle seat and contraption control with IPlayerControllable
ControlSystem — Vehicle Seat and Contraption Control is a that drives components on contraptions. When a player sits in a , the system walks the connected contr…
UndoSystem: Per-player undo functionality
UndoSystem: Per-Player Undo Functionality This example shows the UndoSystem which provides per-player undo stacks for tracking spawned objects and allowing play…
ControlSystem: Vehicle seat control with IPlayerControllable
ControlSystem: Vehicle Seat Control with IPlayerControllable This example shows the ControlSystem which manages vehicle seat control, sorting seats by occupatio…
s&box SaveSystem: Scene save/load
SaveSystem GameObjectSystem API Reference SaveSystem is a saving/loading system that captures the differences between the current scene state and the original s…
Stats Service: Recording and Reading Player Statistics in s&box
Games can record per-player stats using . Stats can be queried individually, per-player, or globally. Recording Stats Increment a counter: Set a value directly:…
WebSocket Connections with Auth Token Authentication in s&box
s&box supports WebSocket connections to external servers for custom networking or persistent data outside the local filesystem. Basic Connection and Messaging U…
Auth Tokens: Steam Identity Validation for External Services
Auth Tokens validate that HTTP or WebSocket requests originate from a legitimate Steam user in an active s&box game session. Use them to tie data to Steam accou…
ControlSystem Pattern for Seat/Vehicle Control
ControlSystem - Seat/Vehicle Control Management A that manages control transfer between players and seated entities (vehicles, chairs). Handles input routing an…
Sync Properties: Automatic Property Replication with [Sync] Attribute
Adding the attribute to a property on a Component will have its latest value sent to other players each time it changes. Only the owner of the object can change…
NetList and NetDictionary: Delta Sync, OnChanged Callbacks, Write Guard, and CanWriteChanges
NetList and NetDictionary: Networked Collections with Delta Sync and are s&box networked collection types for use with . They only send changes (deltas) over th…