docs.rs failed to build bevy_renet2-0.11.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
bevy_renet2-0.10.0
Bevy Renet
A Bevy Plugin for the renet2 crate, forked from renet. A network crate for Server/Client with cryptographically secure authentication and encrypted packets. Designed for fast-paced competitive multiplayer games.
Usage
Bevy renet is a small layer over the renet2 crate, it adds systems to call the update function from the client/server. RenetClient, RenetServer, NetcodeClientTransport and NetcodeServerTransport need to be added as a resource, so the setup is similar to renet2 itself:
Server
let mut app = new;
app.add_plugin;
let server = new;
app.insert_resource;
// Transport layer setup
app.add_plugin;
let server_addr = "127.0.0.1:5000".parse.unwrap;
let socket = bind.unwrap;
let server_config = ServerSetupConfig ;
let transport = new.unwrap;
app.insert_resource;
app.add_system;
app.add_system;
app.add_system;
// Systems
Client
let mut app = new;
app.add_plugin;
let client = new;
app.insert_resource;
// Setup the transport layer
app.add_plugin;
let authentication = Unsecure ;
let socket = bind.unwrap;
let current_time = now.duration_since.unwrap;
let mut transport = new.unwrap;
app.insert_resource;
app.add_system;
app.add_system;
// Systems
Example
You can run the simple example with:
- Server:
cargo run --features="serde native_transport" --example simple -- server - Client:
cargo run --features="serde native_transport" --example simple -- client
If you want a more complex example you can checkout the demo_bevy sample:
Bevy Compatibility
| bevy | bevy_renet2 |
|---|---|
| 0.17 | 0.11.0 - |
| 0.16 | 0.9.0 - 0.10.0 |
| 0.15 | 0.0.7 - 0.8.1 |