In this guide you will find a collection of helpful resources that will get you started with the basics of developing a game for s&box. This is just a personal list of things I found really helpful when I just started developing for s&box. I hope these resources will help you just as much as they did help me.
Before we head into the thick of things, be aware that...
As outlined in the Download & Install Documentation the editor can be found in the Steam Tools Section called "s&box editor". Just install it and launch it trough Steam. Simple right?
If, for some reason, this shouldn’t work, there is a Workaround for this! Simply start the sbox-dev.exe from within the game folder. Make sure it’s the game folder you’re looking in and not the editor folder. ( Just right-click the game in Steam > Manage > Browse local files and double click the sbox-dev.exe file )
Once the launcher is started, you can create a new project or open the default "Sweeper" project for reference.
Setting up your Project Locally
After clicking the "+ New Project..." button, you will be greeted by a new window where you can select which Project Type you want to create and what name, identifier and the location on your drive it should have.
Currently there are 5 types of projects:
Game - Empty
Use this if you want to create a Game for s&box.
This is your full "Game" Editor tools, very similar to Unity and Godot.
Game - Player Controller
Contains prefabs for various PlayerController such as: First Person, Third Person and Top Down.
Addon
Use this if you just want to make a general purpose Map or a Model and upload it into the s&box cloud.
These can then be accessed by game developers via the cloud asset browser or by people in the Sandbox Mode's spawn menu.
Perfect for when you just man to make a generic map that can then be used by developers or as a map in Sandbox.
Sandbox Game Addon
Use this if you want to make a Custom Scripted Entity specifically for the Sandbox Mode.
Contains example Scripted Entities for Sandbox.
As of now, you can only create Scripted Entities (sents) spawned through the spawn menu. You cannot currently use this to create custom tools.
This guide is assuming you're using the "Game - Empty" project type, since all other project types share the same editor environment as "Game - Minimal" but only differ in their restrictions on what type of features you can use.
# Setup your IDE Make sure you have an IDE installed. There are currently 3 officially supported IDE's available: Visual Studio, Visual Studio Code and Rider. You can change the selected compatibility from the "Edit > Preferences" Menu.
However if you know how, you can still set up any IDE of your choice to code for s&box, but you might run into issues. As you can read in this handy guide ( thanks @braxen ) , there may be further setup needed for the IDE of your choice. Make sure to follow these instructions to get the best experience.