Loading repository data…
Loading repository data…
cBournhonesque / repository
A networking library to make multiplayer games for the Bevy game engine
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A library for writing server-authoritative multiplayer games with Bevy. Compatible with wasm via WebTransport.
https://github.com/cBournhonesque/lightyear/assets/8112632/7b57d48a-d8b0-4cdd-a16f-f991a394c852
Demo using one server with 2 clients. The entity is predicted (slightly ahead of server) on the controlling client and interpolated (slightly behind server) on the other client. The server only sends updates to clients 10 times per second but the clients still see smooth updates.
You can first check out the examples.
To quickly get started, you can follow this tutorial, which re-creates the simple_box example.
You can also find more information in this WIP book.
Workspace crate sources live under crates/, grouped by role. Directory names drop the lightyear_ prefix, but Cargo package names keep it.
crates/io: low-level IO links and backends such as aeronet, link, udp, crossbeam, websocket, and webtransportcrates/connection: connection abstractions and adapters such as connection, raw_connection, netcode, and steamcrates/core: the top-level lightyear crate plus shared core, sync, utils, and frame interpolation cratescrates/inputs: input crates such as inputs, inputs_native, input_bei, and inputs_leafwingcrates/replication: replication, prediction, and interpolation cratescrates/transport: serialization, transport, and message cratescrates/integration: Bevy ecosystem integrations such as Aviancrates/platform, crates/deterministic, crates/tools, and crates/tests: platform support, deterministic replication, tooling, and test supportbincode as a default serializer, but you can provide your own serialization functionClient, and lightyear makes sure that the client input for tick N will
be processed on tick N on the server.
Inputs are protected against packet-loss: each packet will contain the client inputs for the last few frames.leafwing feature, there is a special integration with
the leafwing-input-manager crate, where
your leafwing inputs are networked for you!bevy-enhanced-input crate!Replicate bundle will be automatically replicated to clients.| Lightyear | Bevy |
|---|---|
| 0.28 | 0.19 |
| 0.26-0.27 | 0.18 |
| 0.25 | 0.17 |
| 0.20-0.24 | 0.16 |
| 0.18-0.19 | 0.15 |
| 0.16-0.17 | 0.14 |
| 0.10-0.15 | 0.13 |
| 0.1-0.9 | 0.12 |
Roomstracing and metrics libraries to emit spans and logs around most events (
sending/receiving messages, etc.).avian