johanhelsing / matchbox

Painless peer-to-peer WebRTC networking for rust wasm (and native!)
Apache License 2.0
889 stars 73 forks source link

Silent Spectator #145

Closed logixworx closed 1 year ago

logixworx commented 1 year ago

Can a spectator be completely silent, with little to no egress data sent for things like requesting updates?

I'd imagine it's possible if its only receiving confirmed input from other clients & delayed.

simbleau commented 1 year ago

Not entirely sure I understand what you want, but I'll take a stab at it.

You want a spectator to not send any data to peers, but you want the spectator to know what's going on with those peers, right?

In that case, you can't get around needing at least one peer that is in the full-mesh network to forward that information to the spectator. You can think of this peer as both a player ( in the full-mesh network), but also acting as a server to a spectator (client).

There's no enforcement you need to make the server here a player, either. But that information cannot magically transfer silently to a spectator. Somehow, they needs to be in the network.

Group 1

garryod commented 1 year ago

This is definitely possible at the moment, the clients have full control over what they do or don't send. Making this more ergonomic would likely play into the simplify topology to users work (#108).

logixworx commented 1 year ago

@simbleau @garryod

Thanks! What about when matchbox is used as a transport for ggrs?

johanhelsing commented 1 year ago

ggrs has a spectator mode, see https://github.com/gschup/bevy_ggrs/tree/main/examples#launching-boxgame-p2p-and-spectator

johanhelsing commented 1 year ago

Closing, as I don't think there's anything we could/should do on our side to make this more clear? More an issue for ggrs/bevy_ggrs.