cBournhonesque / lightyear

A networking library to make multiplayer games for the Bevy game engine
https://cbournhonesque.github.io/lightyear/book
Apache License 2.0
410 stars 42 forks source link

Client -> server replication issues #430

Open cBournhonesque opened 3 months ago

cBournhonesque commented 3 months ago

So the replication troubles you had were: 1) client to server replication stops after 20-30 minutes 2) client to server replication is broken on reconnections? FIXED 3) in the client to server replication example, when a second client disconnects, on the first client the replicated entities of the second client do not get despawned. This can be solved by adding a ControlledBy component on the server entity. However maybe we should add a ControlledBy component automatically for entities that were replicated from a remote client? (Maybe not though, if a client is simulating/replicating entities that it doesn't control directly..)

Nul-led commented 3 months ago

1) is weird, maybe remnants of tick wrapping?

Nul-led commented 3 months ago

Yea i agree with the sentiment in 3. rather have this as a user responsibility. But making this more clear wouldnt hurt ig (section in the book abt this maybe?)