1 unstable release
| 0.8.0 | Feb 2, 2026 |
|---|
#1838 in Game dev
305KB
7.5K
SLoC
Bevy adapter for sdec schema + delta encoding.
sdec-bevy
Bevy ECS integration for the SDEC snapshot + delta codec.
What it provides
- Build a
schema::Schemafrom Bevy components viaBevySchemaBuilder. - Extract per-tick creates/destroys/updates from a
World. - Apply decoded SDEC updates back into a Bevy
World. - Map Bevy
EntityIDs to stable SDECEntityIdvalues.
Typical flow
- Define replicated components with
ReplicatedComponent/ReplicatedField. - Build a schema with
BevySchemaBuilder. - Call
extract_changes(orextract_changes_with_scratch) each tick. - Encode deltas with
sdec-codecand send over your transport. - Decode and apply on the client with
apply_changes.
Notes
This crate focuses on Bevy ECS integration only. Transport, packetization,
relevancy, and chunking are handled outside sdec-bevy.
For a working example, see sdec-bevy-demo.
Dependencies
~15MB
~287K SLoC