To make a simple game in S&box, create a Game – Empty project, add a GameObject and a small C# Component, then use an input action to make something visible happen. You can do this in the editor without building a full map or using every tool. This beginner path follows the official Your First Project guide.
What you need to make your first S&box game
S&box games use C#, but you do not need to build the whole world in code. The editor lets you arrange objects in a scene and attach Components that add behavior. For a first project, keep the goal small: one object, one input, and one change you can see when you run the game.
As an Amazon Associate I earn from qualifying purchases.
- Scene: the game world being rendered and updated. Scenes can be saved and loaded.
- GameObject: a positioned, rotated, and scaled object in the world. GameObjects can be nested, so a child moves relative to its parent.
- Component: a modular piece of functionality attached to a GameObject. For example, a ModelRender component renders a model, while a BoxCollider makes an object solid.
The official Explore the Engine guide explains these building blocks. The wider Getting Started documentation describes S&box as a C# engine with an editor-based workflow for iterating on scenes and code.
Install S&box and create a Game Project
- Install S&box through Steam and open the editor. The official Getting Started with S&box page says the editor and game come in the same download.
- On the welcome screen, choose New Project.
- Select Game – Empty. This starts a new game project with a blank scene rather than adding content to an existing game.
Choose a Game Project, not an Addon Project. A Game Project is the base project that contains a game; an Addon Project contributes assets to an existing game project. The project’s .sbproj file stores information such as its title and type. See the official Project Types documentation.
#1 Best Overall
Add an object and a custom Component
- Create a GameObject from the scene tree. It will be the object your first behavior acts on.
- Select the GameObject and use Add Component in the inspector. Create a custom Component; the official first-project guide says this opens the file in Visual Studio.
- Give the object something visible to change. For example, add or configure a rendered object so that movement is easy to see. A GameObject’s transform includes its world position, rotation, and scale.
The editor’s scene tree and inspector let you work with objects and their Components without writing every aspect of the scene as code. The first-project guide’s full sequence is documented at Your First Project.
Make one input change the object’s position
Use an input action to change the GameObject’s WorldPosition when a key is pressed. This creates a simple interaction: press a key, and the object moves. Follow the current input setup and API details in the official first-project guide and the relevant input documentation it references; the guide’s published outline does not provide a complete sample game’s code, so use its linked API instructions rather than treating an unverified snippet as ready to paste.
Rank #2
If the object moves but the change is hard to see, make the camera follow it: parent the camera to the object, or set Scene.Camera.WorldPosition as appropriate for your scene. The goal is not a finished movement system; it is a clear input-to-result loop you can test and refine.
Run the game and iterate
- Run the project from the editor and check that the scene appears as expected.
- Press the key tied to your input action. Confirm that the object changes position and that the camera still shows it.
- Adjust one thing at a time. Change the object’s starting position, movement amount, or camera arrangement, then run it again.
S&box documentation describes a hotload system for code changes, which can help shorten the edit-and-check loop. Exact behavior can depend on the project and current editor version; consult the current Getting Started documentation if hotloading does not update your running project.
When to use ActionGraph or Hammer
You do not need ActionGraph or Hammer for this first interaction. Pick a tool based on the kind of work your game needs:
| Approach | Best fit | What to expect |
|---|---|---|
| C# Component | A small, hand-written behavior attached to a GameObject | Uses C# and fits the official first-project route. |
| ActionGraph | Visual scripting for game logic | An alternative editor capability; the official first-project exercise does not require it. |
| Hammer | Building a map with brushwork, props, lights, and GameObjects | Useful when the project calls for a custom map, not necessary for the initial object-and-input exercise. |
See the official Editor and Editor Tools documentation for more on available editor capabilities. The documentation identifies these options but does not establish a controlled comparison of their ease or performance.
Rank #4
Making the project is separate from distributing it
You can make and test a simple project in the editor without meeting standalone-export conditions. The official Getting Started documentation describes standalone export as being in preview and requiring Valve approval and a Facepunch license. Those distribution conditions are separate from creating and running a first project, and may change; check the current Getting Started page before planning a standalone release.
Recommended Free Tools
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




