TBE Runtime

Readers of this documentation should already be familiar with the model of the base data.

The TBE Runtime introduces the use of R3

The Runtime objects will never get persisted. When saving/loading, we map relevant data to objects that are specific for saving/loading so we can exactly control what gets saved/loaded and in which order.

Topics

Messaging

The MessageBus.Singleton static component is the entry point to Messaging. Messaging takes place in a pub/sub fashion. A reactive stream is used as MessageBus so clients can filter the stream and only react to certain messages.

Messages derive from GameMessage so everybody can find out which Message classes exist.

Actors

Actors are reacting to messages and are displaying corresponding visuals or playing sounds.

At runtime, every actor is associated with a unit.

Animations

Animations use the unity animation system. Animations and Animation Controllers are not provided by TBE because they are project specific.

TBE only describes the way in which you integrate your animations. See Animator and Animations

Input

We consider the mouse to have two buttons and one is the "select" button and the other is the "action" button. The select button always does the same, regardless of the current game state. It selects a unit. The action button is context-sensitive and can be one of "move-to", "use", "attack".

See also the classes InputManager and ClientPlayerContext

UI

The UI has the responsibility to observe the runtime data it wants to present.

The Unit UI is "reused", which means that it is not destroyed and recreated when the selected Unit changes. However, cast slots and item slots in the UI are destroyed and recreated when the selected Unit changes.

Gameplay

Unit Alignment

Every Unit belongs to a player. Every player is in a Team. A Player has a PlayerController which is one of

User, Neutral, Hostile, Computer
  • User means the Player is controlled by a User.

  • Every Player can - apart from his own units - control Neutral Units.

  • Hostile Units show no Behavior of their own out of the box. Hostile Behavior is not included in TBE and has to be added by the user.

  • Computer has the agenda to win the game.

NPC Behavior is not (yet?) part of TBE.