WebSockets
Use WebSockets for real-time communication with external servers. Basic Setup With Auth Token Common Use Cases Custom networking — External matchmaking, chat se…
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 .…
Decals in s&box
Decals in s&box Decals are textures projected onto surfaces for bullet holes, graffiti, scorch marks, etc. Decal Component Add to a GameObject: DecalDefinition …
Sandbox: Physgun — grab, freeze, launch, and pull mechanics
Physgun — Grab, Freeze, Launch, and Pull Mechanics The Physgun () is a that lets players grab, move, freeze, and launch physics objects. It uses a struct to tra…
s&box player management with RPC, ConCmd, and Connection APIs
s&box Player Management with RPC, ConCmd, and Connection APIs This example shows player kick/ban utilities using s&box's Connection, RPC, ConCmd, and Chat syste…
Unit Tests - s&box Documentation
Official s&box documentation for Unit Tests - automated testing. Unit Tests covers writing and running tests for s&box code. Tests can verify component behavior…
Sandbox: ISpawner interface — custom spawner pattern with ISpawnEvents
ISpawner Interface — Custom Spawner Pattern The interface defines the contract for anything that can be spawned via the spawn menu. Implementations include , , …
Input Handling Code Examples
Input Handling Code Examples Comprehensive input examples covering buttons, analog sticks, mouse, controller, and VR input. Default Input Actions
Code Generation - s&box Documentation
Official s&box documentation for Code Generation - compile-time code generation. Code Generation covers the source generator system in s&box. The generator crea…
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…
Post Processing System
Post Processing System Add visual effects like bloom, tonemapping, and film grain with post-processing volumes. Overview Post processing in s&box uses a volume-…
Sandbox.Rotation
Sandbox.Rotation Represents 3D orientation. Overview Rotation stores an orientation in 3D space, handling quaternion math internally. Creation Constants Applyin…
Testing Multiplayer - s&box Networking Documentation
Testing Multiplayer s&box provides tools for testing multiplayer locally without needing multiple computers or Steam accounts. New Instance Launch a second game…
Sandbox: Player spawn flow with PlayerData, events, and NetworkSpawn
Player Spawn Flow in s&box Sandbox The Sandbox game uses a (a ) to handle player connections and spawning. Here's the full pattern: GameManager spawns players o…
Download & Install - s&box Documentation
Download & Install Install Purchase s&box on Steam Install it via your Steam Library Launch s&box Launch After launching s&box, you will be presented with a men…
LimitsSystem Per-Player Spawn Limits
LimitsSystem Per-Player Limits Enforces configurable spawn limits per player with automatic tracking via ISpawnEvents. Key Features Per-player tracking via Stea…
Ownership - s&box Networking Documentation
Ownership Network ownership determines which client or the host has authority over a networked GameObject. The owner controls synced properties and can send RPC…
Sandbox.GameResource
Sandbox.GameResource Base class for custom asset types. Overview GameResource is the base class for creating custom asset types that appear in the editor with f…
Networked Objects - s&box Documentation
Official s&box documentation for Networked Objects and ownership. Networked Objects covers GameObject networking setup and configuration. Ownership determines w…
Creating Post-Process Effects: BasePostProcess with Volume Blending and Shaders
Create custom post-processing effects in s&box by deriving from . This enables volume-based blending and custom shader rendering. The Component Key Methods GetW…