Vixen
02b45cc4
csharp
public interface IReplicationRate

How often one object's state is worth sending to one connection.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Separate from interest, and the separation is a correction to [16](../../../docs/plan/16-networking.md). That document lists the resolvers as "scene scope → explicit visibility overrides → distance grid → LOD rate reduction", which reads as four filters in a chain. The last one is not a filter, and building it as one produces a bug that looks like the feature working.

The reason is ReplicationServer's own design: leaving the observed set means "drop this object", because destruction and walking over the horizon are deliberately the same mechanism to a client. So an object omitted from the set to skip a tick is an object destroyed and recreated on that tick, together with whatever the game hangs off a spawn. Rate has to be decided where the records are written, where skipping one already means "not this tick" — it is the same thing the bandwidth budget does when it sheds, and it takes the same path out: not acknowledged, so it goes in the next snapshot.

Methods (1)

  • bool ShouldSend(World world, PlayerId player, Entity entity, NetworkId id, Tick tick)

    Whether this object's state is worth writing to this connection on this tick.

Used by (2)

  • DistanceReplicationRateVixen.Net
  • ReplicationServerVixen.Net