From dae598f33b628f70ca961186ef842b1c93c22677 Mon Sep 17 00:00:00 2001 From: Lucas Poffo Date: Sun, 1 Dec 2024 19:36:17 -0300 Subject: [PATCH] Update READMEs --- README.md | 5 +++-- bevy_renet/Cargo.toml | 6 +++--- bevy_renet/README.md | 16 ++++++++++++++-- renet_netcode/README.md | 12 ++++++++++++ renet_steam/README.md | 6 ------ 5 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 renet_netcode/README.md diff --git a/README.md b/README.md index dafd0408..da5d2541 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,9 @@ Provides the following features: - ReliableUnordered: guarantee of message delivery but not order - Unreliable: no guarantee of message delivery or order - Packet fragmentation and reassembly -- Authentication and encryption, using [renetcode](https://github.com/lucaspoffo/renet/tree/master/renetcode) - - The transport layer can be customizable. The default transport can be disabled and replaced with a custom one +- Authentication and encryption, using [renet_netcode](https://github.com/lucaspoffo/renet/tree/master/renet_netcode) + - You can also use [renet_steam](https://github.com/lucaspoffo/renet/tree/master/renet_steam) to use the `Steam` transport and authenticantion layer + - The transport/authentication layer can be customizable, you can write your own if necessary ## Channels diff --git a/bevy_renet/Cargo.toml b/bevy_renet/Cargo.toml index 8b2cdafd..b8dd39a0 100644 --- a/bevy_renet/Cargo.toml +++ b/bevy_renet/Cargo.toml @@ -20,9 +20,9 @@ name = "simple" required-features = ["netcode"] [dependencies] -bevy_app = "0.15.0" -bevy_ecs = "0.15.0" -bevy_time = "0.15.0" +bevy_app = "0.15" +bevy_ecs = "0.15" +bevy_time = "0.15" renet = { path="../renet", version = "0.0.16", features = ["bevy"] } renet_netcode = { path="../renet_netcode", version = "0.0.1", features = ["bevy"], optional = true } renet_steam = { path="../renet_steam", version = "0.0.2", features = ["bevy"], optional = true } diff --git a/bevy_renet/README.md b/bevy_renet/README.md index 06ab7dee..6cdae076 100644 --- a/bevy_renet/README.md +++ b/bevy_renet/README.md @@ -1,4 +1,5 @@ # Bevy Renet + [![Latest version](https://img.shields.io/crates/v/bevy_renet.svg)](https://crates.io/crates/bevy_renet) [![Documentation](https://docs.rs/bevy_renet/badge.svg)](https://docs.rs/bevy_renet) ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) @@ -9,9 +10,11 @@ A network crate for Server/Client with cryptographically secure authentication a Designed for fast-paced competitive multiplayer games. ## Usage + Bevy renet is a small layer over the `renet` 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 `renet` itself: -#### Server +### Server + ```rust fn main() { let mut app = App::new(); @@ -71,7 +74,8 @@ fn handle_events_system(mut server_events: EventReader) { } ``` -#### Client +### Client + ```rust fn main() { let mut app = App::new(); @@ -136,3 +140,11 @@ If you want a more complex example you can checkout the [demo_bevy](https://gith |0.9|0.0.6| |0.8|0.0.5| |0.7|0.0.4| + +## Steam + +By default `bevy_renet` uses `renet_netcode` as the transport layer, but you can also use the steam transport layer if you wish by enabling the `steam` feature. + +This adds the transport structs `SteamServerTransport`, `SteamClientTransport` and the bevy plugins `SteamServerPlugin`, `SteamClientPlugin`, the setup should be similar to default transport layer. + +You can check the [Bevy Demo](https://github.com/lucaspoffo/renet/tree/master/demo_bevy) for how to use the default and steam transport switching between them using feature flags. diff --git a/renet_netcode/README.md b/renet_netcode/README.md new file mode 100644 index 00000000..d9b3beaf --- /dev/null +++ b/renet_netcode/README.md @@ -0,0 +1,12 @@ +# Renet Netcode + +[![Latest version](https://img.shields.io/crates/v/renet_netcode.svg)](https://crates.io/crates/renet_netcode) +[![Documentation](https://docs.rs/renet_netcode/badge.svg)](https://docs.rs/renet_netcode) +![MIT](https://img.shields.io/badge/license-MIT-blue.svg) +![Apache](https://img.shields.io/badge/license-Apache-blue.svg) + +Transport layer for the [renet](https://github.com/lucaspoffo/renet) crate using [renetcode](https://github.com/lucaspoffo/renet/tree/master/renetcode). + +## Usage + +This crate adds `NetcodeServerTransport` and `NetcodeClientTransport`, to see usages of this crate you can checkout `renet` README and the renet echo example. diff --git a/renet_steam/README.md b/renet_steam/README.md index 2b30db8b..40ca38af 100644 --- a/renet_steam/README.md +++ b/renet_steam/README.md @@ -105,9 +105,3 @@ Only steam users connected to the lobby will be able to connect to the server. I - client: `cargo run --example echo client [HOST_STEAM_ID] [LOBBY_ID]` The LOBBY_ID is printed in the console when the server starts. - -## Bevy - -If you are using bevy, you can enable the `bevy` feature and instead of using the default transport that comes in `bevy_renet` you can use `SteamServerPlugin` and `SteamClientPlugin`, the setup should be similar. - -You can check the [Bevy Demo](https://github.com/lucaspoffo/renet/tree/master/demo_bevy) for how to use the default and steam transport switching between them using feature flags.