s&box
RustCounter-Strike 2s&boxDeadlock
Wiki
Get s&box on Steam
Browse
OverviewGetting StartedCreating GamesEngine & ToolsDocumentationCommunity GamesResources
s&boxDocumentationGetting StartedProject TypesGame Project
SOURCE 2 · C#
Build and play games with s&box.

Facepunch's game engine and creation platform — make games in C#, or jump straight into community games.

Get s&box on Steam

s&box Wiki

  • Overview
  • Getting Started
  • Creating Games
  • Engine & Tools
  • Documentation
  • Community Games
  • Resources

Tools & Community

  • Getting Started
  • Creating Games
  • Engine & Tools
  • Resources

Platforms

  • RustBattle
  • CSBattle
  • Rust Game Wiki
  • CS2 Skins Wiki
  • Deadlock Wiki

About

  • Official Site
  • Developer Wiki
  • GitHub
  • Get on Steam
NOT AFFILIATED WITH FACEPUNCH STUDIOS · © 2026 s&box Wiki (community)
Docs/Getting Started
Getting Started

Game Project

A game project is the base level of project. It contains a game.

The game project generally defines a startup scene in its project settings. This scene is usually loaded first - before any other scene.

Depending on the game you're making, you might want an intro or menu scene. You can set the startup scene to your menu scene, and have your menu load your main game scene after the user chooses to play.

It's totally valid to not have a menu or intro scene though, and just jump straight into the game.

If your game is capable of loading maps from the main menu then that map is loaded instead of your startup scene. This presents a problem for your game - because none of your game stuff is in that map. You probably want to spawn UI and game manager stuff in the map, in order to let people play.

The way to do this is to create a GameObjectSystem that will spawn in all that stuff. Here's an example where we spawn it in from another scene.

public sealed class MyGameManager : GameObjectSystem<MyGameManager>, ISceneStartup
{
	public MyGameManager( Scene scene ) : base( scene )
	{
	}

	void ISceneStartup.OnHostInitialize()
	{
		var slo = new SceneLoadOptions();
		slo.IsAdditive = true;
		slo.SetScene( "scenes/engine.scene" );
		Scene.Load( slo );
	}
}

Source: Facepunch/sbox-docs (CC-BY-4.0) · updated 2024-10-03. Read it rendered on the official docs.

More in Getting Started

Addon Project
Download & Install
Explore the Engine
FAQ
Getting Started
Monetization
Project Types
Reporting Errors
← All documentation

Community wiki — not affiliated with Facepunch Studios. For the latest and most authoritative information, see the official developer wiki.