lucaspoffo / renet

Server/Client network library for multiplayer games with authentication and connection management made with Rust
Apache License 2.0
685 stars 68 forks source link

Transport abstraction #115

Closed Shatur closed 1 year ago

Shatur commented 1 year ago

I working on https://github.com/lifescapegame/bevy_replicon. It currently coupled with Netcode. Users started to ask me to decouple it (https://github.com/lifescapegame/bevy_replicon/issues/61), but there are two problems:

  1. I need to run my systems before sending and after receiving independent on transport.
  2. I need conditions to be transport independent.

I think this could be solved on Renet side:

lucaspoffo commented 1 year ago

2) Yeah, this is something that should be implemented. Now that we have multiple transport abstractions this is pretty clear. Adding a simple enum that returns Disconnected/Connected/Connecting should be enough, and the transport layer would need to update this whenever the client transport state changes.

1) This shouldn't be that hard to add