Add System to Game

Now that we’ve finished coding our System, let’s add it to our list of game features.

We mentioned Features when we launched the editor before. Now it’s time to make use of them.

In this section, we’ll:

  • Use the Architect to add the Player Input system to the Game Features

Systems and Features

The WorldAsset Editor includes several tabs – one of them is the Systems tab, which allows the game designer to specify which Systems are applicable for the world.

Hello World Systems

So, when the player is in Hello World, they will use the Game Systems feature. In the Menu world, they would use the Menu System feature. This way, each World can have different game mechanics associated with it.

The Game Systems feature contains several sub-features, that, in turn, contain many more systems.

Game Systems

Add Player Input system

  1. If HelloMurder.Editor isn’t already running, launch it by pressing F5 in Visual Studio, or start it with dotnet watch.

    The Murder engine supports Hot Reload. With Hot Reload, changes made in Visual Studio should reflect in the Editor window whenever you save a file. Hot Reload also updates the executable if you start with dotnet watch.

    In short – you can close the window, but you don’t have to.

  2. Click the Features folder in the Assets tree to expand it.

  3. Then click the Character feature. The FeatureAsset editor for Character.json will open.

    Character Feature

  4. Click the Add system field. (Alternately, you could also click the + button next to the Add system field.) Select PlayerInputSystem from the dialog that follows.

    Character Feature - showing Player Input system

  5. The Systems list now includes PlayerInputSystem. Click Save Asset to save your changes to the Character feature.

Next steps

Now that we’ve added the Player Input system, it’s time to add an Agent to our player character.