Vixen
02b45cc4
csharp
public interface IInterestSource

Where the entities a chain considers come from.

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

Remarks

Separate from the rules, and that separation is where the scaling is. A rule filters what it is given, so a chain of rules over every networked entity costs one sweep of the world per player — ten thousand objects and two hundred players is two million questions a tick, whatever the rules then say. A source that can answer "what is near this player" without looking at everything is what turns that into one pass plus a small lookup each, and it is the whole of the difference between twenty players and two hundred.

Which is why the distance grid is a source rather than a rule. It reads as a filter — "is this within range" — and writing it as one would produce something that passes every test and scales like the thing it was meant to replace.

Methods (1)

  • void Candidates(World world, PlayerId player, List<Entity> into)

    Fills with the entities worth asking about.

Used by (3)

  • AllNetworkedSourceVixen.Net
  • InterestChainVixen.Net
  • InterestGridVixen.Net