Skip to content

joshuascript/sbox-public

 
 

Repository files navigation

s&box — Linux Native Fork

This is a fork of Facepunch/sbox-public focused on running s&box natively on Linux without Proton.

s&box editor

How This Fork Works

The s&box engine was built for Windows and relies on a case-insensitive filesystem, Windows-native input handling, and native Win32 APIs throughout its C++ layer. This version runs on Linux by emulating case-insensitivity for the managed and native-level binaries:

  • Managed C# patches — changes to the engine's C# layer to handle Linux display servers (X11, XWayland, Wayland), input routing via SDL3, and case-insensitive path resolution through the virtual filesystem
  • Native patches (via Anvil) — C shims preloaded at launch via LD_PRELOAD that intercept filesystem calls and patch native engine crashes in libengine2.so and librendersystemvulkan.so

The managed changes live in this repository. The native patches are managed separately by the Anvil Project.

Anvil — Required

Anvil is required to run this fork. It provides the native patch layer that the engine cannot function without on Linux.

Anvil is installed and kept up to date automatically by the Linux bootstrap script. Nothing else is needed.

Getting Started on Linux

Prerequisites

  • Git
  • .NET 10 SDK
  • gcc (for compiling native patches)
  • python3 (for crash analysis tools)

Setup

# Clone the repo
git clone https://github.com/joshuascript/sbox-public.git
cd sbox-public

# Run the Linux bootstrap — installs Anvil and builds managed artifacts
bash bootstrap

The bootstrap will automatically clone Anvil, compile the native patches, and walk you through building the managed engine artifacts.

Launching

Before launching for the first time, compile the native patches:

bash anvil/launch/patch_engine.sh

Then use the Anvil launch scripts — do not run the sbox binary directly.

# Normal launch
bash anvil/launch/launch-sbox.sh

# Launch with automated crash capture (GDB)
bash anvil/launch/launch-sbox-gdb.sh

Crash traces are written to logs/gdb/ as numbered files per session.

Contributing

If you would like to contribute to the engine, please see the contributing guide.

If you want to report bugs or request new features, see sbox-issues.

Documentation

Full documentation, tutorials, and API references are available at sbox.game/dev/.

License

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. These binaries are distributed under the s&box EULA. You must agree to the terms of the EULA to use them.

This project includes third-party components that are separately licensed. Those components are not covered by the MIT license above and remain subject to their original licenses as indicated in game/thirdpartylegalnotices.

About

s&box is a modern game engine, built on Valve's Source 2 and the latest .NET technology, it provides a modern intuitive editor for creating games

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 91.5%
  • HLSL 4.1%
  • HTML 1.8%
  • C++ 1.2%
  • SCSS 1.1%
  • ReScript 0.2%
  • Other 0.1%