Networking in Bevy/Rust: Bevy Renet Showcase

preview_player
Показать описание
This is a showcase of the Renet networking plugin for the Bevy Game Engine. The underlying library should work with any other Rust game engine. I cover the basics of how the library is structured and walk through how to create a simple ping example from scratch.

Resources:

Chapters:
0:00 Introduction
1:56 Code Example
3:39 Client
5:43 Server
7:40 First Connection
8:07 Sending a Ping
10:45 Scaling the Game
12:53 Outro
Рекомендации по теме
Комментарии
Автор

For the MinimalPlugin running as fast as possible the solution is to add this resource before adding the `MinimalPlugin`:
/ 60.0))

olestrohm
Автор

5:14: I'm surprised and glad to see someone else using the port 42069. I use that for a lot of my projects.

JosephCatrambone
Автор

PLEASE make an updated version of this tutorial!

oglothenerd
Автор

5:32 - at this point I realized renet changed too much and if you're just following along, you'll just want to look at the bevy_renet examples.

Metruzanca
Автор

Can't wait for the voxel game demo!

cylian
Автор

Wow I was literally planning on doing something similar for Bevy! I was going to implement a lockstep implementation though, but I might just use this instead. Awesome!

TheScreamingFedora
Автор

Neat!

If only I was working on something with multiplayer.

AshtonSnapp
Автор

This was a great resource for me. I did have one question though. For `client_receive_messages` should those fire off bevy events or be processed from the mut lists?
Probably could do either but idk which way would be more manageable

nate-wilkins
Автор

Thanks for this video. It is great!
I might be missing something tho... I don't see the benefit of having bevy as a dependency on both ends (client and server) and having 2 game loops... It feels like a lot of overhead IMHO don't you think?

wPederzoli
Автор

4:15 Ah yes. The most logical thing to expect people to do... "Hey computer, exactly how long has it been since the universe began?" Why ask what time it is, when you could do that?

halotroop
Автор

Your videos are really a gold mine. One question: When do you see a visual editor like Unity on the horizon for Bevy? I think the visualization of Unitys ECS is made quite nicely and I think something like it would work for bevy as well.

SEOTADEO
Автор

Hello, I wanted to ask how to connect to a public ip address? What do I need to change? I have port forwarded. Thanks.

kristupasT
Автор

Does it support UPnP so that you don't have to port forward?

saicher
Автор

This is cool, thanks for sharing.
I'm planning on networking going through central server, but collisions and stuff on one of the clients, with failover to next client if first isn't reliable, and state stored on server in case failover needed (memory and db), but thought the physics would best be offloaded to a client to prevent on the processing on the server. Any thoughts on this architecture? Trying to both keep security (central server instead of p2p), but minimize server load as well. Even with WebGPU, could use compute shader on client for collision detection.

jeffg
Автор

Can you recreate this video using the newest versions and if possible, cover how to use renet with the steam api? Thanks a lot

isengrim_
Автор

Great thanks. Would be interested in a server version without bevy and if this runs in wasm

devdev
Автор

Is there anything that you wish were different about this implementation?

wadecodez
Автор

On the cheating front, for browser embedded games, it's probably kindof hard, right. Unless you bind the variables to javascript via bindgen, the user can't change any variables in the wasm itself (via browser tools), right? I haven't thought through it too much, but I feel we get away from the cheats a bit with WA. encrypt data sent if needed. Could even sign the WASM file as well.

jeffg