34 releases (22 breaking)

new 0.23.0 Feb 22, 2024
0.21.3 Feb 16, 2024
0.18.2 Dec 27, 2023
0.17.0 Nov 12, 2023
0.1.0 Mar 28, 2023

#81 in Game dev

Download history 70/week @ 2023-11-08 79/week @ 2023-11-15 89/week @ 2023-11-22 160/week @ 2023-11-29 54/week @ 2023-12-06 70/week @ 2023-12-13 114/week @ 2023-12-20 118/week @ 2023-12-27 123/week @ 2024-01-03 106/week @ 2024-01-10 149/week @ 2024-01-17 135/week @ 2024-01-24 149/week @ 2024-01-31 64/week @ 2024-02-07 765/week @ 2024-02-14 1524/week @ 2024-02-21

2,552 downloads per month
Used in 2 crates

MIT/Apache

205KB
3.5K SLoC

Bevy Replicon

crates.io docs.rs codecov

ECS-focused high-level networking crate for the Bevy game engine using the Renet library.

Features

  • Authentication and encryption, using renetcode.
  • Packet fragmentation and reassembly.
  • Support for client and server both in one App and in separate.
  • Customizable transport layer. Right now only Netcode is supported, but Steam, WebTransport, and memory channels are on the way (new Renet release is needed).
  • Component-oriented world state replication.
  • Events-based messaging API with different guarantees (reliable, reliable unordered, and unreliable).
  • Control over client visibility of entities and events.
  • Replication into scene to save server state.
  • API focused on writing logic once that automatically works for singleplayer, client, server, and listen server (when server is also a player).

Prediction and interpolation are not implemented in this crate and are considered out of scope. But the idea of the crate is to provide an extensible core, so if your game needs something, you can implement it on top. Also check out related crates.

Getting Started

Check out the quick start guide.

See also examples.

  • bevy_timewarp - a rollback library that buffers component state. See this instruction about how to integrate.
  • bevy_replicon_snap - a snapshot interpolation plugin.
  • bevy_replicon_attributes - adds ergonomic visibility control through client attributes and entity/event visibility conditions. An extension of this crate's raw client visibility API.
  • bevy_replicon_repair - preserves replicated client state across reconnects.

Bevy compatibility

bevy bevy_replicon
0.13.0 0.23
0.12.1 0.18-0.22
0.11.0 0.6-0.17
0.10.1 0.2-0.6
0.10.0 0.1

Dependencies

~20–60MB
~1M SLoC