Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/facepunch/sbox-public/llms.txt

Use this file to discover all available pages before exploring further.

Building s&box from source lets you compile the engine yourself, inspect the internals, and contribute changes back to the project. This page walks you through every step — from installing the required tools to running the editor binary you just built.
If your goal is to create games rather than modify the engine itself, install s&box directly from Steam instead. This repository is intended for contributors and advanced users.

Prerequisites

You need three tools installed on Windows before you begin:

Git

Version control. Required to clone the repository.

Visual Studio 2022+

C++ and C# build toolchain. Install the Desktop development with C++ and .NET desktop development workloads.

.NET 10 SDK

Required to run the build tooling and compile C# code.

Building the engine

1

Clone the repository

Open a terminal and clone the public repository from GitHub:
git clone https://github.com/Facepunch/sbox-public.git
This downloads the engine source and all build configuration files into a new sbox-public directory.
2

Run Bootstrap.bat

Navigate into the cloned directory and run the bootstrap script:
Bootstrap.bat
This script runs three build stages in sequence using the SboxBuild tool:
dotnet run --project .\engine\Tools\SboxBuild\SboxBuild.csproj -- build --config Developer
dotnet run --project .\engine\Tools\SboxBuild\SboxBuild.csproj -- build-shaders
dotnet run --project .\engine\Tools\SboxBuild\SboxBuild.csproj -- build-content
  • build --config Developer — compiles the engine in developer configuration
  • build-shaders — compiles all engine shaders
  • build-content — packages engine content assets
The first run can take several minutes as it downloads dependencies and compiles everything from scratch. Subsequent builds are faster.
3

Run the engine

Once the build completes, the game and editor binaries are placed in the game/ folder. Launch the editor from there to verify everything compiled correctly.

License notes

The s&box engine source code is licensed under the MIT License.
Certain native binaries in game/bin are not covered by the MIT license. They are distributed under the s&box EULA — you must agree to those terms to use them. Third-party components under game/thirdpartylegalnotices remain subject to their original licenses.

Next steps

Contributing

Learn how to report bugs, request features, and submit pull requests.

Scripting basics

Start writing C# components once you have the engine running.

Build docs developers (and LLMs) love