Server/Client network library for multiplayer games with authentication and connection management made with Rust
Server/Client network library for multiplayer games with authentication and connection management made with Rust
Renet is a network library for Server/Client games written in rust. It is focused on fast-paced games such as FPS, and competitive games. Provides the following features:
Steam transport and authenticantion layerRenet communication is message based, and channels describe how the messages should be delivered.
Channels are unidirectional, ConnectionConfig.client_channels_config describes the channels that the clients sends to the server, and ConnectionConfig.server_channels_config describes the channels that the server sends to the clients.
Each channel has its own configuration ChannelConfig:
…Renet aims to have a simple API that is easy to integrate with any code base. Poll for new messages at the start of a frame with update. Call send_packets from the transport layer to send packets to the client/server.
……Checkout renet_netcode if you want to use UDP with the netcode protocol.
Checkout renet_steam if you want to use the steam transport layer.
You can checkout the echo example for a simple usage of the library. Usage:
cargo run --example echo -- server 5000cargo run --example echo -- client 127.0.0.1:5000 CoolNickNameOr you can look into the two demos that have more complex uses of renet:
Bevy Demo
Simple bevy application to demonstrate how you could replicate entities and send reliable messages as commands from the server/client using renet:
Chat Demo
Simple chat application made with egui to demonstrate how you could handle errors, states transitions and client self hosting:
Checkout bevy_renet if you want to use renet as a plugin with the Bevy engine.
Checkout renet_visualizer for a egui plugin to plot metrics data from renet clients and servers:
No open issues yet, or sync has not completed.