Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ General Development
- [Codebase Info](en/general-development/codebase-info.md)
- [Help, I'm So Lost](en/general-development/codebase-info/im-so-lost.md)
- [Conventions](en/general-development/codebase-info/conventions.md)
- [General programming](en/general-development/codebase-info/conventions/general.md)
- [Project programming](en/general-development/codebase-info/conventions/project.md)
- [ECS Conventions](en/general-development/codebase-info/conventions/ecs.md)
- [Architecture](en/general-development/codebase-info/conventions/architecture.md)
- [Networking Conventions](en/general-development/codebase-info/conventions/networking.md)
- [Resource Conventions](en/general-development/codebase-info/conventions/resources.md)
- [Module Conventions](en/general-development/codebase-info/conventions/modules.md)
- [Pull Request Guidelines](en/general-development/codebase-info/pull-request-guidelines.md)
- [Goobmodules and You](en/general-development/codebase-info/goobmodules-and-you.md)
- [Codebase Organization](en/general-development/codebase-info/codebase-organization.md)
- [Feature Proposals](en/general-development/feature-proposals.md)
- [Feature Proposal Template](en/templates/proposal.md)
- [Expected Team Decorum & Usage](en/general-development/feature-proposals/expected-feature-proposal-decorum.md)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/en/general-development/codebase-info.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Codebase Info

# Codebase Info
This section contains info pertinent to the codebase and contribution, such as the code conventions and pull request guidelines.
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Acronyms and Nomenclature

| Shorthand | Meaning |
|:------------------------ |:-------------------------------------------------------------------------------------------------------------- |
| GS14 | Goob Station. The coolest Space Station 14 server. |
| SS14 | Space Station 14. Remake of Space Station 13 (SS13). |
| BYOND | The game engine for SS13. |
| RobustToolbox, Engine | SS14's game engine. (Think BYOND). |
| Content, Content Pack | The "game" running on RobustToolbox. (Think SS13). |
| CVar | Convar/Console Variable. Configurable value that you can change in the config files or through the console. |
| .yml, YAML | YAML Ain't Markup Language. Used to define prototypes. |
| .toml, TOML | Tom's Obvious Minimal Language. Like YAML but for config. |
| ECS | Entity Component System |
| IoC | [Inversion of Control](https://docs.spacestation14.com/en/robust-toolbox/ioc.html) |
| .dmi, DMI | BYOND/SS13's sprite file format. Converted to an RSI for our usage. |
| .rsi, RSI | Robust Station Images. SS14's image "file" format (actually a folder). |
| PVS | Potentially Visible Set. Stops the server from sending out-of-range entities to clients. |
| VSC, VSCode | Visual Studio Code. Not the same as VS. |
| VS | Visual Studio Community 2017/19. Not the same as VSC. The IDE for people who can't get a Rider license. |
| Rider | [A crossplatform IDE for C#.](https://www.jetbrains.com/rider/) (Can be obtained for free as a student). |
| Watchdog | SS14 Server Watchdog. Used for dedicated server logging, updating and general management. |
| Lidgren | Networking library. |
| Box2D | The basis for SS14's (heavily modified) physics system. |
| Avalonia | UI framework used for the launcher. |
| Postgres, SQLite | Databases. |
# Acronyms and Nomenclature
| Shorthand | Meaning |
|:------------------------ |:-------------------------------------------------------------------------------------------------------------- |
| GS14 | Goob Station. The coolest Space Station 14 server. |
| SS14 | Space Station 14. Remake of Space Station 13 (SS13). |
| BYOND | The game engine for SS13. |
| RobustToolbox, Engine | SS14's game engine. (Think BYOND). |
| Content, Content Pack | The "game" running on RobustToolbox. (Think SS13). |
| CVar | Convar/Console Variable. Configurable value that you can change in the config files or through the console. |
| .yml, YAML | YAML Ain't Markup Language. Used to define prototypes. |
| .toml, TOML | Tom's Obvious Minimal Language. Like YAML but for config. |
| ECS | Entity Component System |
| IoC | [Inversion of Control](https://docs.spacestation14.com/en/robust-toolbox/ioc.html) |
| .dmi, DMI | BYOND/SS13's sprite file format. Converted to an RSI for our usage. |
| .rsi, RSI | Robust Station Images. SS14's image "file" format (actually a folder). |
| PVS | Potentially Visible Set. Stops the server from sending out-of-range entities to clients. |
| VSC, VSCode | Visual Studio Code. Not the same as VS. |
| VS | Visual Studio Community 2017/19. Not the same as VSC. The IDE for people who can't get a Rider license. |
| Rider | [A crossplatform IDE for C#.](https://www.jetbrains.com/rider/) (Can be obtained for free as a student). |
| Watchdog | SS14 Server Watchdog. Used for dedicated server logging, updating and general management. |
| Lidgren | Networking library. |
| Box2D | The basis for SS14's (heavily modified) physics system. |
| Avalonia | UI framework used for the launcher. |
| Postgres, SQLite | Databases. |
| EntityUid | Entity Unique Identifier |
50 changes: 50 additions & 0 deletions src/en/general-development/codebase-info/codebase-organization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Codebase Organization

## Projects

SS14 and RobustToolbox are split into several different projects. The main ones you'll care about are the `Client`, `Shared`, and `Server` projects. Other projects are for smaller things like integration tests, benchmarks, or database-specific code.

`Client`, `Shared`, and `Server` are each packaged into different 'assemblies', which is basically .NET talk for executables or shared libraries.

The `Client` project in both Robust and SS14 contains client-specific code, like UI. This assembly is only sent to the client, the person actually playing the game.

The `Server` project contains server-specific code that no specific client should be able to interact with, like atmospherics or botany. This assembly is only located on the game server.

The `Shared` project contains shared code that can be used by the client or the server. This assembly is not executable, and it relies on the client or server to call functions in it or use data classes located within it. The purpose of shared is to allow for network prediction (where the client and server run the same code, to make things smoother) as well as to specify shared data classes, like network messages, so that the client and server can speak to each other effectively.

Shared code is only allowed to access other shared code, not client or server code. However, client and server code are always allowed to access shared code.

## Game Code

In SS13, all game code is randomly thrown around under `code/`, and instead of grouping by relevance to systems, is grouped by abstract things like whether the file is a list of constants or whether a file pertains to a master controller subsystem. In SS14, we first delineate by which game system we're working with (atmos/botany/buckling, etc) and then by the classes needed for it, which is much easier for anyone actually trying to work within a single system.

`Content.Client`, `Content.Shared`, and `Content.Server` all follow this organization. RobustToolbox's equivalents do not currently, but will in the future.

- All game code will be organized in folders directly under Content.Client/Shared/Server etc.
- Game code folders are split into Components, EntitySystems, Visualizers, UI, Prototypes, etc
- If there would only be one file in a folder, it doesn't need a folder (unless that file would go directly into the project's top directory, which is undesirable).
- Do not use 'misc' folders; misc folders are hell for organization and its completely arbitrary what goes inside them and what doesn't. You can encapsulate smaller game systems inside larger game systems if it unambiguously makes sense (Atmos -> Piping), but don't just slap all the smaller game systems into a misc folder.

This structure should hopefully be very clear after working with it or seeing examples.

A real example, under `Content.Server` at `da11cbd8e6bef3373ec1f570df7d7b9155a3890f`

![](../../assets/images/codebase-server-example.png)

- Atmos is a fairly large game system. It has many folders, and many files that do not need to go in these folders.
- Botany is a smaller game system. However, it only has one folder for Components since that's all that's really there.
- ItemCabinets are a very small game system. They just have a component and EntitySystem, and thus do not need folders for each.

## Resources

The resources folder is another area where we hope to improve over the organization structure of SS13 codebases.

### Entity Prototypes

New folders should usually only be created for a new parent type. If you find something that can be pulled out into a parent prototype, it should go in its own folder.

Parent prototypes should be contained in `base.yml` in this folder, while other prototypes go in a different file.

Not everywhere is organized like this; however, the `Structures` folder is.

This was chosen to make the directory structure mirror the prototype inheritance tree, making it obvious where to place new prototypes as well as being fairly unambiguous when choosing to create new folders.
Loading
Loading