Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspoffo committed Dec 1, 2024
1 parent f613baa commit dae598f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions bevy_renet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
16 changes: 14 additions & 2 deletions bevy_renet/README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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();
Expand Down Expand Up @@ -71,7 +74,8 @@ fn handle_events_system(mut server_events: EventReader<ServerEvent>) {
}
```

#### Client
### Client

```rust
fn main() {
let mut app = App::new();
Expand Down Expand Up @@ -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.
12 changes: 12 additions & 0 deletions renet_netcode/README.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 0 additions & 6 deletions renet_steam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit dae598f

Please sign in to comment.