Periwink
Periwink
Benchmarks show that it takes 1.3 ms to replicate 1000 entities (replicon takes 30us). Why? With a lot of tracing spans, it's 3ms (because of the tracing overhead): - send_entity_spawn...
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...
Use https://github.com/cBournhonesque/bevy/blob/main/crates/bevy_ecs/src/world/entity_ref.rs#L828-L828 when applying received components
- Video about relay server + authority transfer: https://docs.coherence.io/overview/how-does-coherence-work It would be nice to also have a seamless authority transfer (which should be doable pretty easily! It's just a matter...
List of networking models: https://mas-bandwidth.com/choosing-the-right-network-model-for-your-multiplayer-game/ - [x] Distributed authority (with client-side simulation): supported - [x] Pure Client/Server (all clients use interpolation): supported - [ ] Client-side prediction and lag compensation:...
Maybe via a command like this: https://github.com/cBournhonesque/lightyear/blob/0.14.0/lightyear/src/shared/replication/commands.rs#L9 ?
We store some bevy `Tick` in the ReplicationSender to track if we should send an update using change detection. Those values need to be clamped, just like bevy's ticks are....
After running ```rust mut servers: ResMut, // ... let _ = servers.disconnect(*client_id); ``` we get spammed with logs ``` 2024-08-30T20:53:28.729407Z ERROR send_packets: lightyear::server::networking: Error sending packets: netcode error: tried to...
As stated in the comment; if the entity has been pre-mapped by the remote, then we still want to return it in `remove_by_remote` even if not present in `self.local_to_remote`.
Currently, visibility handling despawns/respawns entities. We could have another mode where an entity that stops being visible just doesn't get any replication updates anymore (replication is suspended). The updates come-in...