auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
menu_bookDocumentation
May 20, 2026

Testing Multiplayer: Local Multi-Instance Development Workflow

The best way to test multiplayer is having someone join your game, but s&box provides tools for solo testing. Spawning a New Instance Click the network status i…

menu_bookDocumentation
May 20, 2026

HTTP Requests: Async GET, POST, and JSON with the Static Http Class

s&box provides a static class for creating asynchronous HTTP requests (GET, POST, DELETE, etc.) with JSON content and response parsing. URL Restrictions Only or…

menu_bookDocumentation
May 20, 2026

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…

menu_bookDocumentation
May 20, 2026

Async Components: Coroutine-Style Async Tasks on the Main Thread

Async tasks in s&box run on the main thread by default, operating like coroutines. They are the recommended replacement for coroutines in s&box. Basic Async Fra…

menu_bookDocumentation
May 20, 2026

Leaderboards: Stat-Based Rankings with Filtering, Centering, and Aggregation

Leaderboards in s&box are stats aggregated and ordered. They use the same stat system and provide filtering, sorting, and centering options. Basic Example By de…

menu_bookDocumentation
May 20, 2026

Playing Sounds: SoundEvent, SoundHandle, and GameObject Audio in s&box

s&box provides several ways to play sounds in code: fire-and-forget at a world position, control via SoundHandle, attach to a GameObject, or use scene component…

menu_bookDocumentation
May 20, 2026

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…

menu_bookDocumentation
May 20, 2026

PlayerController: Built-in First/Third Person Controller with Physics, Input, and Camera

The PlayerController component is a first and third person player controller built into s&box. It is physics-based (a special RigidBody) with built-in input, ca…

menu_bookDocumentation
May 20, 2026

Network Visibility: Per-Connection Object Culling with INetworkVisible

Network Visibility controls whether a networked object should be visible (receive ongoing network updates) for a specific player. By default, all networked obje…

menu_bookDocumentation
May 20, 2026

Network Events: INetworkListener for Player Join, Leave, and Active Callbacks

Implement or on a component to react to players joining and leaving the game. INetworkListener Example Spawn a player object when someone joins: INetworkListene…

menu_bookDocumentation
May 20, 2026

Network Ownership: Taking, Dropping, and Transferring Object Control

Networked GameObjects can be owned by a connection. Objects owned by a connection are simulated by that connection — their position and sync variables are contr…

menu_bookDocumentation
May 20, 2026

Networked Objects: NetworkSpawn, Interpolation, and Network Modes

Any GameObject can become a networked object by calling on it. It will then be sent to all clients and can have Sync Properties and RPC Messages. Network Mode I…

menu_bookDocumentation
May 20, 2026

RPC Messages: Remote Procedure Calls with Broadcast, Owner, and Host Targets

Components can contain RPCs (Remote Procedure Calls). An RPC is a function that when called, is also called remotely on other clients. Broadcast RPC makes a fun…

menu_bookDocumentation
May 20, 2026

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…

menu_bookDocumentation
May 20, 2026

Triggers: Non-Blocking Collision Detection with ITriggerListener

A trigger is a collider that detects when other physics objects enter or exit it without blocking their movement. Useful for pickup zones, death planes, checkpo…

menu_bookDocumentation
May 20, 2026

Tracing: Scene Traces with Ray, Sphere, and Box Shapes

Scenes can be traced against using with a builder pattern. At minimum, traces need a shape, start, and end position. You can filter by tags or use your project'…

menu_bookDocumentation
May 20, 2026

DecalDefinition: PBR Decal Assets with Color, Normal, and Parallax

A DecalDefinition in s&box holds what a single decal should look like. It describes color, normals, roughness, metalness, ambient occlusion, and optional parall…

menu_bookDocumentation
May 20, 2026

Standalone Code: Full .NET Access and STANDALONE Constant for Exported Games

When s&box games are exported as standalone builds, they run outside the platform with additional capabilities not available in platform games. STANDALONE Const…

menu_bookDocumentation
May 20, 2026

ActionGraph: Visual Scripting with Nodes, Links, and Control Flow

ActionGraph is s&box's visual scripting language. Each node describes an action or expression, and links between nodes carry values or signals. No C# coding req…

menu_bookDocumentation
May 20, 2026

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…