S&box Wiki

Getting Started - Your First Project

work in progress

This page is a work in progress - contributions are encouraged! See notes for details.

This is supposed to be a beginner-friendly walkthrough, as a lot of the content here assumes prior knowledge.

Welcome to S&box!

Formalities over; it's time you started doing something with this opportunity! Roll up those sleeves and get knuckle deep in the mosh pit.

Choosing the right IDE

Visual Studio 2022

An IDE you're comfortable with is a must. We suggest Visual Studio 2022 as the Community-Edition is free and you can open your Code-Base inside S&box right away.

image.png

Follow this external guide to help you get set up for C# development.

JetBrains Rider

This is a commercial product, depending on your workflow this might be your preferred choice.

See here, how to get started with Jetbrains Rider

Visual Studio Code

Another Code-Editor. This might your preference due it's performance or simplicity.

See here, how to get started with Visual Studio Code

S&box Game Editor

Next up, start the S&box Game Editor through Steam

image.png
image.png

Adjusting the Launch Settings

Chances are, you'll be opening this most of the time. If you wish, you can enforce to start the Game Editor by default.

  1. View the properties of S&box
steam_5LSW87SWxe.png
  1. Set the Options
image.png

Creating a Project

Don't get overwhelmed. There's lots to look at here, but we can work our way through it. You can check out the Editor overview for more information about the different sections of the editor.

First things first, create a project.

image.png
image.png

Leave the Project Type for this one as Game. Fill in the Project Title and then hit OK.

Opening your project in Visual Studio

Head back to Steam, and open S&box's local files.

image.png

Then, open up s&box.sln

image.png

Any projects loaded in the S&box Game Editor will appear in this solution.

Just find your_fantastic_gamemode inside of the Games folder. This will appear under the Solution Explorer panel, on the right side of your screen by default.

image.png

If you don't see this panel, try clicking on this tab on the right:

image.png

Editing the Code

If you don't know what you're looking at now, you're in for a ride and a half.

image.png

Get creative! Check out our picks of CSharp Learning Resources to help get you started.

S&box will automatically compile your gamemode whenever you Save (ctrl + s).

todo: testing your gamemode

Here would be a great place to demonstrate how to playtest your code edits ingame through the Game Editor

Uploading your new Gamemode

Check out the CreatingProjects page.

work in progress

This page is a work in progress - contributions are encouraged! See notes for details.

This is supposed to be a beginner-friendly walkthrough, as a lot of the content here assumes prior knowledge.