Vixen
02b45cc4
csharp
public readonly record struct PredictionHealth

What the server has seen of one client's input, sent back so the client can steer.

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

Remarks

A broadcast rather than a payload kind of its own, because it is not about a networked object — it is about a connection, which is the case broadcasts exist for. The numbers are deltas since the last report rather than lifetime totals, so a controller does not have to remember what it was told last time to work out what just happened.

It is the only thing that knows the answer. A client can measure a round trip, and a round trip is a good estimate of the wrong thing: what matters is whether its input reached the server before the tick it was for, which is a fact about the server's buffer and about nothing the client can observe.

Fields and properties (4)

  • public int Depth

    How many ticks of input the server is holding for this client.

  • public int Starved

    Ticks it simulated with no input since the last report.

  • public int Late

    Inputs that arrived too late to use since the last report.

  • public static string BroadcastName

    The name this message is known by on the wire.

Methods (3)

  • public PredictionHealth(int Depth, int Starved, int Late)

    What the server has seen of one client's input, sent back so the client can steer.

  • public void Write(ref BitWriter writer)

    Writes this message.

  • public static bool TryRead(ref BitReader reader, out PredictionHealth value)

    Reads one.

Used by (3)

  • PredictionHealthReporterVixen.Net
  • PredictionWiringTestsVixen.Net.Tests
  • TickLeadControllerVixen.Net