S&box: Difference between revisions
m (reorder - shaders after programming) |
|||
(91 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar | ||
{{S&box|4}} is a platform and game development toolkit developed by [https://facepunch.com/ Facepunch] studio powered by {{source2| | |title=s&box | ||
}} | |||
{{Stub}} | |||
{{Hierarchy|gmod}} | |||
{{Infobox game | |||
|title = s&box | |||
|image = Software Cover - S&box.jpg | |||
|developer = [[Facepunch Studios]] | |||
|publisher = Facepunch Studios | |||
|releasedates = TBA | |||
|genre = [[WP:Sandbox game|Sandbox]] | |||
|mode = {{w|icon=0|Single-player video game|Single-player}}, {{w|icon=0|Multiplayer video game|Multiplayer}} | |||
|platform = [[WP:Windows|Windows]] | |||
|engine = {{src2|4}} | |||
|appid = 590830 | |||
|codelang = [[WP:C++|C++]], [[WP:C_Sharp_(programming language)|C<nowiki>#</nowiki>]] | |||
|modsupport = Yes | |||
|sdk = s&box Game Editor | |||
|sysreq = <span></span> | |||
* OS: {{w|icon=0|Windows 10|Win 10}} or later | |||
* {{w|icon=0|Central processing unit|CPU}}: Core i5-7500 / Ryzen 5 1600 | |||
* RAM: 8 {{w|icon=0|Gigabyte|GB}} | |||
* Storage: 3 GB or higher disk space | |||
* GPU: GTX 1050 / RX 570, 4GB {{w|icon=0|Video random-access memory|VRAM}}, Vulkan 1.2. | |||
* Note: Installing more addons will increase storage size. | |||
|distribution = [[Steam]] | |||
|website = [https://sbox.game/ Official Website] | |||
|links = {{Steam store|app/590830|Steam page}} | |||
|previousgame = {{gmod|1}} | |||
}} | |||
{{Software status | |||
| appid = 590830 | |||
| type = games | |||
| free = no <!-- Currently marked "no" for now. --> | |||
| status = announced <!-- available values: announced/available/delisted/delisted-dl/ea/earlyaccess --> | |||
| os = Windows <!-- According to SteamDB. --> | |||
| deck = Unknown | |||
| note = Currently in development, available as a open developer preview. | |||
<!-- OTHER STOREFRONTS | |||
This is for games that did uses Valve engines (or closely related to it), that was sold or available for free outside Steam. Works similarly to "note" parameters. | |||
Beside that, you can also use this for console versions of the game sold on PlayStation Network (PS)/MS Store (Xbox) | |||
Do not use affiliate link as it's can affect users with adblockers. And remember to use "•" for spacing if there are sold in multiple other storefronts. --> | |||
| 3rdpartylinks = [https://sbox.game/give-me-that Get S&box open beta] | |||
}} | |||
{{S&box|4}} is a platform and game development toolkit developed by [https://facepunch.com/ Facepunch] studio powered by a highly modified version of {{source2|4}}, planned to be a spiritual successor to {{gmod|4}}. Initially, the development was based on {{ue|4|nt=4}}, but as soon as {{hla|4}} came out, Facepunch immediately requested the engine branch of the newly-published game. A few weeks later {{valve|1}} gave Facepunch access to the terabyte large repository, after which, in 2020, S&box's transition to {{source2|4}} was announced. This is the first (and currently only) time that Source 2 has been licensed to third-party developers. | |||
{{ | {{note|S&box is not just a modding game! It is a complete package including a modified and fully featured {{source2|3}} engine toolkit with C# bindings, and a distribution platform named [https://sbox.game/ sbox.game].}} | ||
__TOC__ | __TOC__ | ||
== User Access == | == User Access == | ||
S&box is currently in | S&box is currently in open developer preview. | ||
Access is available from the S&box site [https://sbox.game/give-me-that here]. Users must sign in through [[Steam]] on website to claim access to the preview. | |||
== | == Features == | ||
{{S&box|4}} runs on highly modified version of {{src2|1}} with the following features: | |||
; Box3D physics | |||
: A modified version of [[Rubikon]] physics engine without Valve specific code that can be quickly updated. Originally referred to as [[Izabu]] | |||
; Hotloading | |||
: The ability to see code changes take effect immediately with blazing fast hotloading, no need to compile and restart your game. | |||
; Mounting assets from games on different engines | |||
: In S&Box, you can mount any assets from games built on different engines. Currently as of [https://store.steampowered.com/news/app/590830/view/541112753868243026 August 2025 Update], S&Box can mount {{quake|1}} assets and can spawn Quake models. | |||
{{ | |||
; Visual Scripting | |||
: With ActionGraph you can create interactive experiences in your levels, without having to write a single line of code, or having sprawling chains of entities. Not meant to program a game entirely in it, but to augment it. | |||
== UGC Content Distribution == | |||
{{ | Instead of using the [https://developer.valvesoftware.com/wiki/Steam_Workshop Steam Workshop] for storing UGC Content {{S&box|4}} uses a custom web based backend called [https://sbox.game/ugc Workshop]. | ||
{{ | == Scene System == | ||
{{S&box|4}} does away with the legacy Entity System and utilizes a [https://docs.facepunch.com/s/sbox-dev/doc/the-scene-system-9V88B33VlE Scene System] which lets you have a [https://docs.facepunch.com/s/sbox-dev/doc/scenes-LT2kjsMBy4 Scene] that is a collection of [https://docs.facepunch.com/s/sbox-dev/doc/gameobject-oUVQQzT4IO Game Objects] to make up the game world. closely resembling the way things are done in [[Wikipedia:Unity (game engine)|Unity]] | |||
== Maps == | == Maps == | ||
[[File: | [[File:Sboxhammernovember2024.png|300px|thumb|Hammer Dated November 2024]] | ||
Mappers are provided with a modified version of the Source 2 Hammer map editor, with some parts exposed for C# scripting for increased flexibility. | Mappers are provided with a modified version of the Source 2 Hammer map editor, with some parts exposed for C# scripting for increased flexibility. This includes integration with the scene system which lets you place game objects with components within the map just like you would in the scene editor. | ||
<h5 style="color: rgba(255,255,255,.9); font-weight: 400;">Project control panel</h5> | <h5 style="color: rgba(255,255,255,.9); font-weight: 400;">Project control panel</h5> | ||
Line 56: | Line 102: | ||
}} | }} | ||
{{ | {{note| Hammer will be removed in the future. Unknown when exactly but its likely to be removed when scene mesh editing is good enough to replace it.}} | ||
{{warning|Lighting baking beyond 32768 units is temporarily unavailable.}} | |||
{{ | {{warning|The nav mesh has not yet been adapted for large spaces, which will cause your OS to freeze if the size of the available territory exceeds 32768 units. In the event of a freeze, the only way out will be an emergency shutdown of the computer. Turn off the navigation mesh in the map compilation window!}} | ||
{{ | {{warning|There are problems with Floating point precision. Polygons start behaving incorrectly if you are too far from the zero coordinates (faint defects start after crossing 8 km, and are extremely noticeable after 20 km)}} | ||
== Programming == | == Programming == | ||
S&box user content is programmed with C#, Microsoft's managed, object-oriented programming language of [https://en.wikipedia.org/wiki/. | |||
[[File:S&box-actiongraph-screenshot1.png|thumb|right|ActionGraph Example]] | |||
S&box user content is programmed with C#, Microsoft's managed, object-oriented programming language of [https://en.wikipedia.org/wiki/.NET .NET] fame. S&box includes an API which provides bindings to the underlying Source 2 engine and to Facepunch's middleware. All code in user content is distributed in source form, which S&box later compiles on-demand with [https://en.wikipedia.org/wiki/Roslyn_(compiler) Roslyn]. Language support is stated to permit C# 11, indicating that S&box requires a .NET 9.0.0 runtime in order to function, which is bundled with the sbox installation. Only a specific subset of the baseline .NET Core complement is available for use. | |||
Security is a primary concern with user content. C# and its ubiquitous pairing with .NET is a software ecosystem many magnitudes larger, more complex, and more powerful than s&box or Source 2. Awarding unchecked access to this leviathan would effectively turn user content into fully-fledged applications with potentially unlimited access to the host computer. To this end, '''s&box restricts the use of certain types and namespaces.''' For example, access to the local file system is only available through a [https://wiki.facepunch.com/sbox/FileSystem sanctioned abstraction layer]; <code>System.IO.File</code> and similar types may '''not''' be used. This practice is common among applications which attempt to distill down .NET into a limited "scripting" platform for untrusted user code. | Security is a primary concern with user content. C# and its ubiquitous pairing with .NET is a software ecosystem many magnitudes larger, more complex, and more powerful than s&box or Source 2. Awarding unchecked access to this leviathan would effectively turn user content into fully-fledged applications with potentially unlimited access to the host computer. To this end, '''s&box restricts the use of certain types and namespaces.''' For example, access to the local file system is only available through a [https://wiki.facepunch.com/sbox/FileSystem sanctioned abstraction layer]; <code>System.IO.File</code> and similar types may '''not''' be used. This practice is common among applications which attempt to distill down .NET into a limited "scripting" platform for untrusted user code. | ||
Line 74: | Line 125: | ||
}} | }} | ||
There are many similarities between the use of C# in S&box and the use of the more primitive [https://www.lua.org/manual/5.1/ Lua] language in {{ | There are many similarities between the use of C# in S&box and the use of the more primitive [https://www.lua.org/manual/5.1/ Lua] language in {{gmod|4}}. Many concepts of Gmod's Lua environment have been carried over, including limited access to the language's features and "hot reloading" of edited code. | ||
S&box will also have a visual scripting solution called [https://sbox.facepunch.com/news/action-graph/ ActionGraph], which enables a developer to script events via nodes. | |||
== Shaders == | == Shaders == | ||
[[File: | [[File:Shadergraph Screenshot 1.png|230px|thumb|right|Shadergraph UV Rotation Example]] | ||
You can create your own shaders either through HLSL or through the provided Shadergraph Editor and customize their interface for the material editor. | You can create your own shaders either through HLSL or through the provided Shadergraph Editor and customize their interface for the material editor. | ||
S&box supports HLSL Shader Model 3.0 | S&box supports HLSL 2021 & Shader Model 3.0 up to 5.0. | ||
{{Todo|Add more detailed information for the shader graph editor.}} | {{Todo|Add more detailed information for the shader graph editor.}} | ||
{{clr}} | {{clr}} | ||
== External links == | |||
== External | |||
<h5 style="color: rgba(255,255,255,.9); font-weight: 400;">For Developers</h5> | <h5 style="color: rgba(255,255,255,.9); font-weight: 400;">For Developers</h5> | ||
* [https://github.com/Facepunch/sbox-issues Report a bug] | * [https://github.com/Facepunch/sbox-issues Report a bug] | ||
* [https://asset.party/ Asset.Party] | * [https://asset.party/ Asset.Party] | ||
* [https://docs.facepunch.com/s/sbox-dev/doc/sbox-documentation-iWNhAIdqPB/ Documentation] | |||
* [https://wiki.facepunch.com/sbox/ Wiki] | * [https://wiki.facepunch.com/sbox/ Wiki] | ||
<h5 style="color: rgba(255,255,255,.9); font-weight: 400;">Other</h5> | <h5 style="color: rgba(255,255,255,.9); font-weight: 400;">Other</h5> | ||
Line 98: | Line 152: | ||
* [https://forum.facepunch.com/ Forum] | * [https://forum.facepunch.com/ Forum] | ||
* [http://discord.gg/sbox Discord] | * [http://discord.gg/sbox Discord] | ||
{{Source 2 topicon}}[[Category:S&box]] |
Latest revision as of 06:52, 1 August 2025

Watch this page, Steam News, or Steam Updates for more information.
Supported OS:

Also available from the following other storefronts or websites:
Get S&box open beta
S&box is a platform and game development toolkit developed by Facepunch studio powered by a highly modified version of
Source 2, planned to be a spiritual successor to
Garry's Mod. Initially, the development was based on
Unreal Engine 4, but as soon as
Half-Life: Alyx came out, Facepunch immediately requested the engine branch of the newly-published game. A few weeks later Valve gave Facepunch access to the terabyte large repository, after which, in 2020, S&box's transition to
Source 2 was announced. This is the first (and currently only) time that Source 2 has been licensed to third-party developers.

User Access
S&box is currently in open developer preview.
Access is available from the S&box site here. Users must sign in through Steam on website to claim access to the preview.
Features
S&box runs on highly modified version of Source 2 with the following features:
- Box3D physics
- A modified version of Rubikon physics engine without Valve specific code that can be quickly updated. Originally referred to as Izabu
- Hotloading
- The ability to see code changes take effect immediately with blazing fast hotloading, no need to compile and restart your game.
- Mounting assets from games on different engines
- In S&Box, you can mount any assets from games built on different engines. Currently as of August 2025 Update, S&Box can mount Quake assets and can spawn Quake models.
- Visual Scripting
- With ActionGraph you can create interactive experiences in your levels, without having to write a single line of code, or having sprawling chains of entities. Not meant to program a game entirely in it, but to augment it.
UGC Content Distribution
Instead of using the Steam Workshop for storing UGC Content S&box uses a custom web based backend called Workshop.
Scene System
S&box does away with the legacy Entity System and utilizes a Scene System which lets you have a Scene that is a collection of Game Objects to make up the game world. closely resembling the way things are done in Unity
Maps
Mappers are provided with a modified version of the Source 2 Hammer map editor, with some parts exposed for C# scripting for increased flexibility. This includes integration with the scene system which lets you place game objects with components within the map just like you would in the scene editor.
Project control panel
In the projects menu in the dev tools, you can restrict map selection for your game mode. You can limit it to specific curated maps or maps tagged with supporting the game mode.
Publication
Currently, maps can be included with a game mode or released as a separate project(one for each map). The map is published by clicking on a special button in the projects menu in the developer toolkit.
Characteristics
Available territory | Unlimited for models, but 32768 units (624.23 m / 2048 ft) for meshes |
Visibility | Unlimited. The player currently sees approximately 78740 units (2 km / 6561,68 ft) in front of him by default, but values can be increased using C# |




Programming
S&box user content is programmed with C#, Microsoft's managed, object-oriented programming language of .NET fame. S&box includes an API which provides bindings to the underlying Source 2 engine and to Facepunch's middleware. All code in user content is distributed in source form, which S&box later compiles on-demand with Roslyn. Language support is stated to permit C# 11, indicating that S&box requires a .NET 9.0.0 runtime in order to function, which is bundled with the sbox installation. Only a specific subset of the baseline .NET Core complement is available for use.
Security is a primary concern with user content. C# and its ubiquitous pairing with .NET is a software ecosystem many magnitudes larger, more complex, and more powerful than s&box or Source 2. Awarding unchecked access to this leviathan would effectively turn user content into fully-fledged applications with potentially unlimited access to the host computer. To this end, s&box restricts the use of certain types and namespaces. For example, access to the local file system is only available through a sanctioned abstraction layer; System.IO.File
and similar types may not be used. This practice is common among applications which attempt to distill down .NET into a limited "scripting" platform for untrusted user code.
Currently, the C# API and tools are in a preview stage of development. Breaking changes happen often and the API is not yet complete.
- Confirm exact subset of available .NET Core components.
- Confirm whether S&box requires a typical .NET Core installation or if it includes a self-contained runtime.
There are many similarities between the use of C# in S&box and the use of the more primitive Lua language in Garry's Mod. Many concepts of Gmod's Lua environment have been carried over, including limited access to the language's features and "hot reloading" of edited code.
S&box will also have a visual scripting solution called ActionGraph, which enables a developer to script events via nodes.
Shaders
You can create your own shaders either through HLSL or through the provided Shadergraph Editor and customize their interface for the material editor.
S&box supports HLSL 2021 & Shader Model 3.0 up to 5.0.
External links
For Developers
Other