Files
integration/Docs/OLD/Recursion-Free Difference Transmission.md

35 lines
1.9 KiB
Markdown
Raw Normal View History

2026-02-05 12:40:27 -05:00
## Definitions
- Synchronous Models and Connections have a one-to-one mapping. The terms are used interchangeably.
- Sprites are objects in the 3D world. Each has a primary table associated with it.
- Tables are Lua Tables. The runtime assigns each a two-part ID consisting of a Sprite ID and a Table Index that starts at 1 for a Sprites Primary Table.
**Synchronous Models** - Each has a few values within it, which are not directly accessible from Lua:
- Position (Plane, X, Y, Z)
- SpriteID - If present, the connections Position gets updated periodically based on the Position of the Sprite
**Sprites** - These also have a few values which are not directly accessible from Lua:
- Position (Plane, X, Y, Z)
- Sprite ID
- NextTableID
**Tables** - Each table has a mode with hints to the difference transmitter when its OK to suppress it from a synchronous model. Each Table contains a two part ID consisting of a Sprite ID and a Table Index. A Table has an inferred position based on its Sprite ID. Some modes are:
- A: Never Suppress (A Global Table)
- B: Always Suppress (A Secret Table)
- C: Suppress from SMs that are far away (A Sprites Primary Table, a Players publicly viewable data)
- D: Suppress when a connections SpriteID differs from the Tables Sprite ID (A players sensitive data)
- E: Call the Table.Transmit(OtherSpriteID) to determine whether to transmit. (Does Lua have a way to make a const call that prohibits storing data in any table fields?)
**Table Creation** - I am assuming that whichever version of GUI->MethodCall we use there will be the notion of “Actor” and “Place” as in our old engine. The default mode of a table is:
- When Place is the same as Actor: D
- When Place is different from Actor: C
**Difference Transmitter Manipulation** - Designers can explicitly override the default mode of a Table with an intrinsic function:
- SetDiffMode(Table,Mode)
- SetOwner(Table,Sprite)