TBE Runtime Contexts

The classes of the TBE Runtime represent the classes of the base data and define additional properties that are required at runtime.

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

1. TbeDataContext

The TbeDataContext offers access to the tbe base data. This is the data that you edit in the TBE Data Editors. It forms the data scenario for the runtime simulation.

The context has knowledge of - and thus a dependency to - the current player. It will execute a low level simulation logic: applying upgrades.

It does so by providing an api method like:

T getDataForPlayer(T type, string id)

2. ClientPlayerContext

The ClientPlayerContext knows the current player.

3. TbePlayersManager

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 will attack everything but do not have their own agenda.

  • Computer has the agenda to win the game.

Of course, Neutral and hostile are also driven by the computer.