Sandbox: ThrusterEntity and WheelEntity — contraption propulsion with ClientInput bindings
ThrusterEntity and WheelEntity — Contraption Propulsion Components Both and implement and use properties so players can bind them to keys from a vehicle seat. T…
Sandbox: Stacker tool — duplicate objects in a line or arc with StackAlignMode
Stacker Tool — Duplicate Objects in a Line or Arc The Stacker tool clones a selected object N times along a configurable axis with optional rotation and gap. It…
ConVar and ConCmd — console variables and commands with flags and game settings
ConVar and ConCmd — Console Variables and Commands and are s&box attributes for exposing variables and commands to the developer console. Console Commands Conso…
Trigger-Based Background Music Crossfade Framework
This pattern replaces area music with a small local-client music framework. Each zone requests a target , while one controller crossfades the currently playing …
Extensible Player Data Save Hooks for World Components
This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…
RPC-based chat system with avatars and Steam filtering
RPC-Based Chat System with Avatar Support This example shows a complete chat system using Razor, RPC broadcasting, Steam filtering, and avatar display. Key Feat…
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…
GameManager INetworkListener Pattern
GameManager INetworkListener Pattern Game manager implementing connection lifecycle with player spawning and cleanup. Implemented Interfaces INetworkListener - …
s&box achievement unlocking with Rpc.FilterInclude targeting
s&box Achievement Unlocking with Rpc.FilterInclude This example shows achievement unlocking using s&box's Services.Achievements, Services.Stats, and Rpc.FilterI…
HTTP Requests
s&box provides the static class for asynchronous HTTP requests. Allowed URLs Domains only (no IP addresses) permitted on ports: 80, 443, 8080, 8443 Use command …
Moving a SceneObject with Transform in s&box
Use to move a SceneObject each frame in s&box. This moves the object forward at 100 units per second. Prefer over direct manipulation of the SceneObject for net…
BaseWeapon and BaseCarryable Weapon Framework
BaseWeapon and BaseCarryable - Weapon Framework Base classes for creating weapons in s&box. Provides ammo management, view/world models, and input handling. Bas…
DynamiteEntity Explosive Entity Pattern
DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…
Playing Sounds
Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …
BanSystem Pattern for Player Management
BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…
Chat UI Pattern with RPC Broadcasting
Chat UI with RPC Broadcasting A Razor UI component for game chat that handles local input, RPC broadcasting, Steam filtering, and automatic message expiration. …
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…
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…