RPC Messages - s&box Documentation
RPC Messages Components can contain RPCs. An RPC is a function that when called, is called remotely too. Supported RPC arguments are the exact same as Sync prop…
Door Component with IPressable Interface
Door Component with IPressable Map entity door with animated open/close using curves and the IPressable interface. Key Features AnimationCurve for smooth motion…
Performance Best Practices
s&box Performance Best Practices Community guide for writing performant s&box code based on engine behavior and developer recommendations. Object Pooling Avoid …
Project Structure Recommendations
Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…
Terrain System
Terrain System Create expansive outdoor environments with real-time terrain editing, heightmap import, and multi-layer materials. Features Creating Terrain Add …
s&box built-in component quick reference — rendering, physics, navigation, UI, and audio
s&box Component Quick Reference A cheat sheet of the most commonly used built-in components and what they do. Rendering Lighting Physics Navigation UI Audio Gam…
Engine Frame Loop Order: FrameStart, Scene Tick, and FrameEnd Sequence
Engine Frame Loop Order The s&box engine frame loop runs in a specific order each frame. Understanding this is important for knowing when your code runs relativ…
GameResource Extensions - s&box Assets Documentation
GameResource Extensions Extend GameResource types with additional data. Create extensions that attach to existing resources like models or sounds. Creating a Re…
s&box PlayerFallDamage: Fall damage component
PlayerFallDamage Component API Reference PlayerFallDamage is a Component that applies fall damage to the player when they land. It implements Local.IPlayerEvent…
s&box RollermineNpc: Physics-driven NPC
RollermineNpc Class API Reference RollermineNpc is a physics-driven NPC that chases players, leaps at them, and bounces off dealing damage on contact. Implement…
MusicPlayer: Streaming Audio with Visualization and World-Space Positioning
in s&box handles music tracks and streaming audio with programmatic control over playback, positioning, and visualization. For sound effects, use the Sound syst…
Cloud Assets: Using sbox.game Models, Textures, and Sounds in Your Project
s&box provides access to a large selection of cloud assets (textures, models, sounds) from sbox.game without manual downloading or mounting. Cloud Browser Drag …
IDefinitionResource interface
IDefinitionResource Interface Interface for s&box game resources that have title and description metadata. Properties Title () - Display title for the resource …
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…
Mapping - s&box Editor Documentation
Mapping s&box includes Hammer, the Source 2 level editor, for creating maps and environments. Build worlds with brushes, props, lighting, and gameplay entities.…
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…
BasePickup with ITriggerListener and ICollisionListener
BasePickup Abstract Class Abstract base for item pickups using trigger and collision detection with host-only consumption. Key Patterns **** — trigger volume pi…
s&box MetadataAttribute: Resource picker filtering
MetadataAttribute API Reference MetadataAttribute is a reusable property attribute that stores a string tag for resource picker filtering. The editor can read t…
Animation System: Animgraph, Skeletal Animation, IK, and Ragdolls
s&box uses Valve's Animgraph system for character animation, providing a powerful node-based animation state machine. Key Features Animgraph — node-based animat…
Sandbox: BaseWeapon — ammo system, reload, shoot delay, and IPlayerControllable
BaseWeapon — Ammo, Reloading, and Firing Pattern extends and adds ammo management, reloading, and a shoot delay system. It implements so it can also be used fro…