Skip to content

Implement a GameObject (Room, Item or Character).

Refer to the StartupRoom.ts in the backend for an example.

  1. Create a class with the name [Name][Type], for example: DungeonRoom or EvilCharacter.
  2. Extend the class from Room, Item or Character.
  3. Implement the required abstract functions. Regardless of type, all game objects need:

    • A public static readonly Alias attribute with an unique alias.
    • This alias has to be provided through an empty constructor.
    • A name function to return the name of the game object.
  4. Register the game object in the constructor of the GameService using this.registerGameObject, for example this.registerGameObject(DungeonRoom) or this.registerGameObject(EvilCharacter).

Relevante instructievideo’s

Room

Item

Character