pylon-replication 0.20.0

Pylon realtime entity replication: the entity store, change log, and frame format shared by the server and WebAssembly shard modules.
Documentation

Entity replication for Pylon realtime shards.

A simulation keeps its replicated state in a [Replicated] store: entities with stable u64 ids, a 3D position, and components (bytes in the game's own encoding, keyed by a u8 id). Every change bumps the store's change counter, so the server can tell what changed since it last wrote to a given subscriber without diffing snapshots.

The server sends each subscriber replication frames ([frame]): spawn (full state) for entities that came into view, update (only changed axes and components) for entities in view, and despawn for entities that left view. A client applies them to a [ReplicaTable].

A WebAssembly shard module records its store's changes ([Replicated::record_changes]) and hands them to the host each tick; the host applies them to its copy ([Replicated::apply_changes]).

This crate has no dependencies, so guests build it for wasm32-unknown-unknown.