Replies: 4 comments 1 reply
-
Networking is not one of the current focus areas (see the I haven't seen any other issues/discussions on networking, so it looks like this discussion is the de-facto place to discuss it. 😄 |
Beta Was this translation helpful? Give feedback.
-
In that case, I guess I'll throw out some ideas for what I might like to see and how I've been thinking about this problem. Keep in mind I'm not an expert, I have never implemented game networking before, so I might be way off the mark with current approaches to this problem space. There are a few different network modes that could be implemented:
Additionally, there are a few ways Bevy could abstract away most of the hard parts of networking. The biggest abstraction challenge in my mind is how to declare which parts of game state need to be synced across the network, and which don't. Things like menu state and UI elements don't need to be in-sync across clients, but player characters and NPCs and things do. Here are a few off-the-cuff ideas.
A couple of miscellaneous thoughts:
That's all I've got for now. I have no idea if this will be helpful, but I'm thinking about this stuff for my own game, so this is basically my state dump. |
Beta Was this translation helpful? Give feedback.
-
Want to additionally just point out this awesome talk from GDC: Overwatch Gameplay Architecture and Netcode Overwatch uses ECS and the talk touches on some of the ways they synchronize game state between clients. And this one I haven't watched: 8 Frames in 16ms: Rollback Networking in Mortal Kombat and Injustice 2 |
Beta Was this translation helpful? Give feedback.
-
Just want to throw in a possible collab with the Amethyst team. Since the Amethyst engine also uses an ECS (SPECS / Legion), it might be worth syncing with them and see what kind of things they already worked out and how well they fit with Bevy's strategy. CC @fhaynes |
Beta Was this translation helpful? Give feedback.
-
Is there a plan to include a canonical Bevy solution for networking in online multiplayer games?
I'm consistently impressed by Bevy's abstractions and ergonomics and I'm very, very interested in what the team will come up with for networking.
My understanding is that in order to implement rollback-style netcode the engine needs a way to serialize the data which represents a minimal representation of game state from which all other state can be generated. There doesn't seem to be a concept in Bevy yet of separating out state that can be reproduced from other state (e.g., it is likely unneeded to pass Sprite components over the wire since their attributes are likely generated via some fixed mechanism that does not differ across clients, such as which enemy type is being represented).
With the (to my understanding) upcoming Scene rework, are Scenes a good fit for this kind of "representing canonical state" problem? I think I read that Scenes are appropriate for the save/load use case, which should resemble loading state from the network quite closely, albeit with less timing and size constraints.
I'd also be happy to be pointed to previous discussion on this topic, I couldn't find anything with a brief search, but it's entirely possible I missed something.
Beta Was this translation helpful? Give feedback.
All reactions