Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Networking #7

Merged
merged 38 commits into from
May 1, 2021
Merged

Networking #7

merged 38 commits into from
May 1, 2021

Conversation

vladbat00
Copy link
Owner

@vladbat00 vladbat00 commented Feb 18, 2021

  • Implement spawning players and objects
  • Implement interpolation
  • Fix syncing positions
  • Ignore outdated updates (avoid crashing)
  • Allow losing unacknowledged packets
  • Implement disconnecting clients on the server side and despawning
  • Properly close connections on forcible disconnect (blocked by Ability to manually close a connection smokku/bevy_networking_turbulence#17)
  • Implement pausing clients if there are no updates from server (avoid crashing)
  • Implement reconnecting on the client side
  • Investigate panics:
    • Inserting for a frame {} would remove future history (start_frame: {}, limit: {}, len: {})

        3: mr_shared_lib::net::ConnectionState::acknowledge_incoming
                  at .\libs\shared_lib\src\net.rs:223
        4: mr_client_lib::net::process_network_events
                  at .\libs\client_lib\src\net.rs:174
      
    • Expected player (entity: {:?}) direction for frame {}

        2: mr_shared_lib::game::movement::player_movement::{{closure}}
                  at .\libs\shared_lib\src\game\movement.rs:169
        3: core::option::Option<tuple<mr_shared_lib::wrapped_counter::WrappedCounter<u16>, glam::vec2::Vec2*>>::unwrap_or_else<tuple<mr_shared_lib::wrapped_counter::WrappedCounter<u16>, glam::vec2::Vec2*>,closure-2>
                  at C:\Users\mvlabat\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\option.rs:427
        4: mr_shared_lib::game::movement::player_movement
                  at .\libs\shared_lib\src\game\movement.rs:166
      
  • Fix webrtc connectivity
  • Explore reconciliation improvements
  • Fix handshaking when reconnecting
  • Remove link conditioner
  • Fix counting absolute frames diffs
  • Run tests in the CI

Known issues to fix later:

  • Sometimes a player won't spawn
  • Sometimes a player will receive a name of another player
  • Positions can still desync
  • Sometimes a player name isn't received
  • Counting packet loss can be improved: it shouldn't depend on message order. Clients never resend updates to the server (they may only enable redundancy).

@vladbat00 vladbat00 mentioned this pull request Apr 25, 2021
2 tasks
@vladbat00 vladbat00 force-pushed the networking branch 2 times, most recently from ad0e1e4 to ad48309 Compare April 30, 2021 07:14
@vladbat00 vladbat00 marked this pull request as ready for review April 30, 2021 08:46
@vladbat00 vladbat00 merged commit 88f35f4 into main May 1, 2021
@vladbat00 vladbat00 deleted the networking branch May 1, 2021 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant