Skip to content

Views, Updates and Keyframes

Goomii edited this page Mar 25, 2022 · 9 revisions

Views and Controllers

A View is a collection of namespaces networked variables from the server.
A Controller is much the same but present on the client that owns that entity, and allows that client to send commands to the server about it.

Shadow Fields

The state in views are variables reffed to as ShadowFields, these are replicated down from the server to the client in Keyframe or Update messages.

A view can have up to 128, ShadowFields, the range -1 to -128 are reserved to unset nullable fields.
So if a update comes in for ShadowField 20 then that field should be set to that value. But if an update comes in for ShadowField -20 then the ShadowField 20 should be nulled and unset.

View Update Types

There are 2 ways to update a views state.

Keyframe (msg id: 3 or 4)

A keyframe update is a heavy weight way to update alot of a views state at once. This message has an array of bits that denote what nullable fields are included in the message or not. This bit field is at the start of the message. The bits are in order of the nullable fields, this is separate to the shadow field number.

Keyframes for a controller sent to the client will be prefixed with a ulong of the account id.

TODO: Example

Update (msg id 1)

An update message is a more light weight way to update view state if only a few values need to be changed.

In this message each field is prefixed with a byte id, this is the ShadowField index.

Notes

  • Keyframes per entity can be rate limited to 1 every 3 seconds
Clone this wiki locally