From 2aeb9dad28434cf284e259ffda0ddceb656490da Mon Sep 17 00:00:00 2001 From: moonheart08 Date: Thu, 11 May 2023 08:36:48 -0500 Subject: [PATCH] Add an example entity, plus readme rewrite, plus code cleanup. --- Content.Client/EntryPoint.cs | 2 ++ Content.Server/EntryPoint.cs | 2 ++ Content.Shared/EntryPoint.cs | 4 +++- README.md | 16 +++++++++++++--- Resources/Audio/info.txt | 1 + Resources/Fonts/info.txt | 1 + Resources/Prototypes/Entities/example.yml | 7 +++++++ Resources/Textures/info.txt | 1 + 8 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 Resources/Audio/info.txt create mode 100644 Resources/Fonts/info.txt create mode 100644 Resources/Prototypes/Entities/example.yml create mode 100644 Resources/Textures/info.txt diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index 16db41e..0cdec0e 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -1,3 +1,4 @@ +using JetBrains.Annotations; using Robust.Client; using Robust.Client.Graphics; using Robust.Client.State; @@ -9,6 +10,7 @@ using Robust.Shared.Timing; // DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file. namespace Content.Client; +[UsedImplicitly] public sealed class EntryPoint : GameClient { public override void Init() diff --git a/Content.Server/EntryPoint.cs b/Content.Server/EntryPoint.cs index 64dbf39..31849fd 100644 --- a/Content.Server/EntryPoint.cs +++ b/Content.Server/EntryPoint.cs @@ -1,3 +1,4 @@ +using JetBrains.Annotations; using Robust.Server.ServerStatus; using Robust.Shared.ContentPack; using Robust.Shared.Timing; @@ -5,6 +6,7 @@ using Robust.Shared.Timing; // DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file. namespace Content.Server; +[UsedImplicitly] public sealed class EntryPoint : GameServer { public override void Init() diff --git a/Content.Shared/EntryPoint.cs b/Content.Shared/EntryPoint.cs index 04a5d4b..b110718 100644 --- a/Content.Shared/EntryPoint.cs +++ b/Content.Shared/EntryPoint.cs @@ -1,14 +1,16 @@ using System.Globalization; +using JetBrains.Annotations; using Robust.Shared.ContentPack; // DEVNOTE: Games that want to be on the hub can change their namespace prefix in the "manifest.yml" file. namespace Content.Shared; +[UsedImplicitly] public sealed class EntryPoint : GameShared { // IoC services shared between the client and the server go here... - // See line 23. Controls the default game culture and language. + // See line 24. Controls the default game culture and language. // Robust calls this culture, but you might find it more fitting to call it the game // language. Robust doesn't support changing this mid-game. Load your config file early // if you want that. diff --git a/README.md b/README.md index 72b6d22..657919a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ -### Robust Toolbox Template Project! -This is a multiplayer (with optional singleplayer!) template project for RobustToolbox, to help bootstrap the whole thing. Good luck. +## Robust Toolbox Template +This template is designed to provide an easy entrypoint into creating a new game on [RobustToolbox](https://github.com/space-wizards/RobustToolbox), +with a functional client and server provided that can connect to one another (if not much else until you start adding content.) -Also check out our [singleplayer-only template](https://github.com/space-wizards/RobustToolboxTemplateSingleplayer) \ No newline at end of file +This template additionally includes some helpful IDE settings if you're using Visual Studio or Rider, like RobustToolbox-specific file templates to quickly make new components, systems, and prototypes. + +An example file structure for Resources is also provided. + +### Wait, why would I use RobustToolbox? +RobustToolbox is a fairly modern ECS game engine with strong multiplayer support. Out of the box, it's netcode is capable of handling hundreds of players (as demonstrated by the game it was originally written for, [Space Station 14](https://spacestation14.io/)) and is relatively easy to use with less risk of common mistakes like giving clients authority over game state compared to other engines. + +It provides prediction-based server authoritative netcode by default, with options to both autogenerate simple state synchronization for components and to manually implement more complex state application algorithms as necessary. Additionally, basic RPC is provided through networked entity events (which can be sent both ways, and optionally targeted at specific entities) alongside direct access to the underlying transit layer for more direct control when necessary. + +Features like network visibility culling (called PVS by the engine) and replay recording are also provided by default, and client/server code is split to greatly reduce the odds that server specific information leaks over to the client due to programmer error. \ No newline at end of file diff --git a/Resources/Audio/info.txt b/Resources/Audio/info.txt new file mode 100644 index 0000000..66b1d07 --- /dev/null +++ b/Resources/Audio/info.txt @@ -0,0 +1 @@ +Place game audio here. \ No newline at end of file diff --git a/Resources/Fonts/info.txt b/Resources/Fonts/info.txt new file mode 100644 index 0000000..751082f --- /dev/null +++ b/Resources/Fonts/info.txt @@ -0,0 +1 @@ +Place fonts here. \ No newline at end of file diff --git a/Resources/Prototypes/Entities/example.yml b/Resources/Prototypes/Entities/example.yml new file mode 100644 index 0000000..8ac3984 --- /dev/null +++ b/Resources/Prototypes/Entities/example.yml @@ -0,0 +1,7 @@ +- type: entity + id: ExampleEntity + name: example entity + description: example entity's description + components: + - type: Sprite + texture: /Textures/noSprite.png # Provided by the game engine. \ No newline at end of file diff --git a/Resources/Textures/info.txt b/Resources/Textures/info.txt new file mode 100644 index 0000000..0b2fb2a --- /dev/null +++ b/Resources/Textures/info.txt @@ -0,0 +1 @@ +Place textures here. \ No newline at end of file