Skip to content

Commit

Permalink
1.0 Release
Browse files Browse the repository at this point in the history
Some overall README updates
  • Loading branch information
lucaspoffo committed Dec 24, 2024
1 parent dd5660d commit aafeee2
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 25 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Renet aims to have a simple API that is easy to integrate with any code base. Po
```rust
let mut server = RenetServer::new(ConnectionConfig::default());

// Setup transport layer
// Setup transport layer using renet_netcode
const SERVER_ADDR: SocketAddr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 5000);
let socket: UdpSocket = UdpSocket::bind(SERVER_ADDR).unwrap();
let server_config = ServerConfig {
Expand Down Expand Up @@ -119,7 +119,7 @@ loop {
```rust
let mut client = RenetClient::new(ConnectionConfig::default());

// Setup transport layer
// Setup transport layer using renet_netcode
const server_addr: SocketAddr = "127.0.0.1:5000".parse().unwrap();
let socket = UdpSocket::bind("127.0.0.1:0").unwrap();
let current_time = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
Expand Down Expand Up @@ -156,6 +156,12 @@ loop {
}
```

## Transport Layers

Checkout [renet_netcode](https://github.com/lucaspoffo/renet/tree/master/renet_netcode) if you want to use UDP with the [netcode](https://github.com/lucaspoffo/renet/tree/master/renetcode) protocol.

Checkout [renet_steam](https://github.com/lucaspoffo/renet/tree/master/renet_steam) if you want to use the steam transport layer.

## Demos

You can checkout the [echo example](https://github.com/lucaspoffo/renet/blob/master/renet/examples/echo.rs) for a simple usage of the library. Usage:
Expand Down Expand Up @@ -191,8 +197,6 @@ Simple chat application made with egui to demonstrate how you could handle error

Checkout [bevy_renet](https://github.com/lucaspoffo/renet/tree/master/bevy_renet) if you want to use renet as a plugin with the [Bevy engine](https://bevyengine.org/).

Checkout [renet_steam](https://github.com/lucaspoffo/renet/tree/master/renet_steam) if you want to use the steam transport layer instead of the default one.

## Visualizer

Checkout [renet_visualizer](https://github.com/lucaspoffo/renet/tree/master/renet_visualizer) for a egui plugin to plot metrics data from renet clients and servers:
Expand Down
8 changes: 4 additions & 4 deletions bevy_renet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["gamedev", "networking"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/lucaspoffo/renet"
version = "0.0.12"
version = "1.0.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -23,9 +23,9 @@ required-features = ["netcode"]
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 }
renet = { path="../renet", version = "1.0.0", features = ["bevy"] }
renet_netcode = { path="../renet_netcode", version = "1.0.0", features = ["bevy"], optional = true }
renet_steam = { path="../renet_steam", version = "1.0.0", features = ["bevy"], optional = true }

[dev-dependencies]
bevy = {version = "0.15.0", default-features = false, features = ["bevy_core_pipeline", "bevy_render", "bevy_asset", "bevy_pbr", "x11", "tonemapping_luts", "ktx2", "zstd", "bevy_window"]}
Expand Down
5 changes: 5 additions & 0 deletions bevy_renet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ If you want a more complex example you can checkout the [demo_bevy](https://gith

|bevy|bevy_renet|
|---|---|
|0.15|1.0|
|0.14|0.0.12|
|0.13|0.0.11|
|0.12|0.0.10|
Expand All @@ -148,3 +149,7 @@ By default `bevy_renet` uses `renet_netcode` as the transport layer, but you can
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.

# Custom Schedules

If you want more control over how renet is run, instead of adding the `RenetServerPlugin`, `RenetClientPlugin`, you can manually setup the functions they implement (they are all public). Make sure to also setup the plugins for the desired Transport layer.
14 changes: 13 additions & 1 deletion demo_bevy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Simple bevy application to demonstrates how you could replicate entities and sen

[Bevy Demo.webm](https://user-images.githubusercontent.com/35241085/180664609-f8c969e0-d313-45c0-9c04-8a116896d0bd.webm)

## How to run

Running using the netcode transport:

- server: `cargo run --bin server --features netcode`
Expand All @@ -15,4 +17,14 @@ Running using the steam transport:
- client: `cargo run --bin client --features steam -- [HOST_STEAM_ID]`
- The `HOST_STEAM_ID` is printed in the console when the server is started

You can toogle [renet_visualizer](https://github.com/lucaspoffo/renet/tree/master/renet_visualizer) with `F1` in the client.
## Controls

Client:

- AWSD for movement
- Mouse to AIM, left buttom to shoot
- F1 to toogle [renet_visualizer](https://github.com/lucaspoffo/renet/tree/master/renet_visualizer)

Server:

- SPACE to spawn a bot that shoots a lot of bullets (stress test)
4 changes: 2 additions & 2 deletions demo_chat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ edition = "2021"
renet = { path = "../renet" }
renet_netcode = { path = "../renet_netcode" }
renet_visualizer = { path = "../renet_visualizer" }
eframe = "0.29.1"
eframe = "0.29"
serde = { version = "1.0", features = ["derive"] }
bincode = "1.3"
log = { version = "0.4", features = ["std"] }
log = "0.4.22"
env_logger = "0.11"
4 changes: 2 additions & 2 deletions renet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ keywords = ["gamedev", "networking"]
license = "MIT OR Apache-2.0"
readme = "../README.md"
repository = "https://github.com/lucaspoffo/renet"
version = "0.0.16"
version = "1.0.0"

[features]
bevy = ["dep:bevy_ecs"]

[dependencies]
bevy_ecs = { version = "0.15", optional = true }
bytes = "1.1"
log = "0.4.17"
log = "0.4.22"
octets = "0.3"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions renet_netcode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "renet_netcode"
version = "0.0.1"
version = "1.0.0"
edition = "2021"
keywords = ["gamedev", "networking", "transport"]
description = "netcode transport for the renet crate: Server/Client network library for multiplayer games"
Expand All @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
bevy = ["dep:bevy_ecs"]

[dependencies]
renet = { version = "0.0.16", path = "../renet" }
renetcode = { path = "../renetcode", version = "0.0.12" }
renet = { version = "1.0.0", path = "../renet" }
renetcode = { path = "../renetcode", version = "1.0.0" }
bevy_ecs = { version = "0.15", optional = true }
log = "0.4.19"
log = "0.4.22"
6 changes: 3 additions & 3 deletions renet_steam/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "renet_steam"
version = "0.0.2"
version = "1.0.0"
keywords = ["gamedev", "networking", "transport"]
description = "steam transport for the renet crate: Server/Client network library for multiplayer games"
repository = "https://github.com/lucaspoffo/renet"
Expand All @@ -14,9 +14,9 @@ edition = "2021"
bevy = ["dep:bevy_ecs"]

[dependencies]
renet = { version = "0.0.16", path = "../renet" }
renet = { version = "1.0.0", path = "../renet" }
steamworks = "0.11"
log = "0.4.19"
log = "0.4.22"
bevy_ecs = { version = "0.15", optional = true }

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions renet_visualizer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "renet_visualizer"
version = "0.0.9"
version = "1.0.0"
keywords = ["gamedev", "networking"]
description = "Egui metrics visualizer for the renet crate: Server/Client network library for multiplayer games"
repository = "https://github.com/lucaspoffo/renet"
Expand All @@ -13,6 +13,6 @@ edition = "2021"
bevy = ["dep:bevy_ecs"]

[dependencies]
renet = { path = "../renet", version = "0.0.16" }
egui = "0.29.1"
renet = { path = "../renet", version = "1.0.0" }
egui = "0.29"
bevy_ecs = { version = "0.15", optional = true }
4 changes: 2 additions & 2 deletions renetcode/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "renetcode"
version = "0.0.12"
version = "1.0.0"
description = "Server/Client network protocol library for multiplayer games"
keywords = ["gamedev", "networking", "cryptography"]
repository = "https://github.com/lucaspoffo/renet"
Expand All @@ -12,4 +12,4 @@ edition = "2021"

[dependencies]
chacha20poly1305 = "0.10.0"
log = "0.4.17"
log = "0.4.22"

0 comments on commit aafeee2

Please sign in to comment.