S&box: Difference between revisions
(→Programming: Clean up previous edit and adjust for new information.) |
QuackCocaine (talk | contribs) (Add new addon type . could use some more cleanup but its there for now.) |
||
Line 26: | Line 26: | ||
== Addons == | == Addons == | ||
'''S&box currently supports | '''S&box currently supports 5 types of add-ons:''' | ||
{{MdQuote| | {{MdQuote| | ||
{{MdCode|outline|Games}} - addons that run through the main menu of S&box; | {{MdCode|outline|Games}} - addons that run through the main menu of S&box; | ||
{{MdCode|outline|Maps}} - | {{MdCode|outline|Maps}} - addons that typically house maps to be played by a game addon; | ||
{{MdCode|outline| | {{MdCode|outline|Tools}} - from additions to existing editors to tools built completely from scratch, these addons are meant to help you improve, automate, or completely integrate your workflow into the engine, without having to build game-based or external toolsets. | ||
{{MdCode|outline| | {{MdCode|outline|Content}} - Think of it as a place to store assets for one of your game modes or multiple. | ||
{{MdCode|outline|Addon}} - addons for games. (Basic implementation) | |||
}} | }} | ||
{{ModernNote| | {{ModernNote|The Current implementation for game addons as of 10/26/2022 is quite basic as stated here [https://github.com/Facepunch/sbox-issues/discussions/2438 Addons + Razor + New Menu]. It's important to note that Sandbox, (the official Garry's Mod style sandbox add-on for S&box) first introduced a feature called S&Works (Now it is [https://sw.facepunch.com/ Asset.Party]), similar to [https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8f6f.html Garry's Mod Toybox]. Asset.Party, with its own website and support for all (currently available) types of add-ons. It allows you to download models and all their content on the fly, so you can load props from Asset.Party in real-time without restarting the game.}} | ||
== Maps == | == Maps == |
Revision as of 13:10, 26 October 2022
S&box is a platform and game development toolkit developed by Facepunch studio powered by
Source 2. 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 closed developer testing, as of May 5, 2022, the automated queue has been shut down indefinitely due to the termination of the test recruitment in December 2021.
Previously, access was available from the addon developers page, which now takes care of redirecting users to the Asset.Party home page.
Release Date
An exact release date is unknown, but Facepunch plans to release S&box around 2023, according to a post on the project’s description page: “Our plan is to get to a releasable state over the next 6–12 months, then improve it over 10–20 years.”
The approximate dates for the completion of primary work were first announced by Garry Newman on February 19, 2022, on the official S&box Discord server:
Addons
S&box currently supports 5 types of add-ons: Template:MdQuote
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.
Addon control panel
In the addons 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 cannot be launched directly from the game mode, so they have to be released as a separate addon (one for each map). The map is published by clicking on a special button in the addons menu in the developer toolkit.
Characteristics
Unlimited for models, but 32768 units (624.23 m / 2048 ft) for meshes | |
The player currently sees approximately 78740 units (2 km / 6561,68 ft) in front of him |
Shaders
S&box supports HLSL Shader Model 3.0, 4.0 and 5.0. You can create your own shaders and customize their interface for the material editor.
Sounds
Currently, the sounds are arranged in an extremely primitive way due to the content associated with them cut from the engine.
An analog of Steam Audio using C# is currently being developed. In addition, a convenient sound editor based on graph nodes is being developed.
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# 10, indicating that S&box requires a .NET Core 6.0 runtime in order to function. 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.
- Investigate if S&box requires a .NET Core runtime to be installed by the user or if it bundles its own.
There are many similarities between the use of C# in S&box and the use of the more primitive Lua language in Template:Game name. Many concepts of Gmod's Lua environment have been carried over, including limited access the language's features and "hot reloading" of edited code.