feat(net): add reliability layer, state sync, and client interpolation

- ReliableChannel: sequence numbers, ACK, retransmission, RTT estimation
- OrderedChannel: in-order delivery with out-of-order buffering
- Snapshot serialization with delta compression (per-field bitmask)
- InterpolationBuffer: linear interpolation between server snapshots
- New packet types: Reliable, Ack, Snapshot, SnapshotDelta

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 21:03:52 +09:00
parent dccea21bfe
commit 0ef750de69
5 changed files with 1030 additions and 0 deletions

View File

@@ -2,8 +2,14 @@ pub mod packet;
pub mod socket;
pub mod server;
pub mod client;
pub mod reliable;
pub mod snapshot;
pub mod interpolation;
pub use packet::Packet;
pub use socket::NetSocket;
pub use server::{NetServer, ServerEvent, ClientInfo};
pub use client::{NetClient, ClientEvent};
pub use reliable::{ReliableChannel, OrderedChannel};
pub use snapshot::{Snapshot, EntityState, serialize_snapshot, deserialize_snapshot, diff_snapshots, apply_diff};
pub use interpolation::InterpolationBuffer;