1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Server-side building blocks for real-time netcode, the counterpart to
//! [`plaza_client_utils`].
//!
//! Where the client crate holds prediction, interpolation, and smoothing, this
//! holds what an authoritative server needs:
//!
//! - [`HistoricalStateBuffer`]: the rewind of past entity states that lag
//! compensation is built on.
//! - [`relevance`]: deciding what each client needs to see, so a world larger
//! than one screen with more entities than fit on the wire still scales.
//! Z-order (Morton) keys, a spatial grid, and a fast visibility diff.
//! - [`aggregate`]: the third option between sending everything and sending
//! nothing, for the entities a client must *compute* with rather than merely
//! draw. A Barnes-Hut tree that keeps a distant crowd's contribution and drops
//! only its resolution.
//! - [`delta`]: which of a subscriber's deltas actually landed, and how to
//! recover a mirror that has drifted from the state it acknowledges.
//! - [`seats`]: handing a bounded number of seats to whoever connects, and
//! saying out loud when a seat's accumulated state belongs to somebody else.
//! - [`meter`]: turning running totals into rates, so a claim about bandwidth is
//! a number on screen rather than an assertion in a README.
//! - [`oneshot`]: repeating an unacknowledged one-shot op (a `Welcome`, a
//! `Refused`) on a link that can lose one, until the peer's own traffic
//! proves it heard.
//!
//! Like the client crate it is pure logic with no async runtime, so a server
//! simulation can run in wasm (the interactive `netcode_playground` example does
//! exactly this), and it shares the client's [`Interpolatable`] and [`ToF32`]
//! traits so one state type serves both sides.
pub use ;
pub use ;
pub use ;
pub use ;
pub use RateMeter;
pub use ;
pub use ;
// The key space `DeltaBaseline` works in, and the client-side mirror that has to
// agree with it. Both live in the client crate, because a browser client needs
// them and must not inherit a server to get them.
pub use ;
pub use ;
pub use ;
// The interpolation vocabulary is shared with the client crate; re-exported so
// server code can name it without depending on `plaza_client_utils` directly.
pub use ;