ECS Components

Components are only synced when the content differs (hash) and the entities are near each other.

Synced from server to all clients:

  • Body: Description of the visual appearance
  • Scale: Custom scale of the body
  • Stats: Properties of a living creature (health, ...)
  • LightEmitter: Emits light
  • Projectile: Starts triggers on hit
  • Gravity: Custom gravity
  • Sticky: Stops moving when hitting something
  • MountState: Can be mounted
  • Mounting: Can mount something
  • Inventory: Content of inventories like players or chests

Only synced from client to server:

  • Controller: Inputs a character gives to the game

Calculated on both one client and the server, then send to all other clients

  • CharacterState: Movement and active actions
  • PhysicsState: Information about physics (on ground/wall, touching someone, in water)

Calculated by one client, passed to all other clients via the server (which validates it)

  • Pos: Position
  • Vel: Velocity
  • Ori: Orientation

Server-only components:

  • Agent: The brain of NPCs
  • Waypoint: A spawnpoint