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

Significant pause in sync when switching MultiplayerSynchronizer's authority #83112

Closed
romlok opened this issue Oct 10, 2023 · 1 comment · Fixed by #83264
Closed

Significant pause in sync when switching MultiplayerSynchronizer's authority #83112

romlok opened this issue Oct 10, 2023 · 1 comment · Fixed by #83264

Comments

@romlok
Copy link
Contributor

romlok commented Oct 10, 2023

Godot version

v4.1.2.stable.official [399c9dc]

System information

Godot v4.1.2.stable - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1060 (nvidia) - Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (6 Threads)

Issue description

When the authority for a MultiplayerSynchronizer is changed from one peer to another, there is a significant and noticeable delay (I've seen up to several tens of seconds) before synchronisation with the new authority begins.

Note this appears to only be the case when using the sync mode. If a property is watched, there is no perceptible delay.

Steps to reproduce

  1. Run 3+ copies of the attached scene

  2. In one instance, click "Host" to start the localhost server
    Screenshot_20231010_174629

  3. In the other instances, "Join" the server

  4. Clients: Select a different type of sprite motion for each client instance
    Screenshot_20231010_174728

  5. Host: Use the "Authority" buttons on the server to change the MultiplayerSynchronizer authority between the peers:
    Screenshot_20231010_174850

  6. Host: ⚠️ Observe that every authority change after the first will cause the sprite to immediately stop moving, before resuming some seconds later with the new authority's movement ⚠️

  7. In the editor, change the MultiplayerSynchronizer's replication mode for the sprite's position from Sync to Watch
    Screenshot_20231010_180359

  8. Host: Observe that there is no longer a delay when switching authority.

Minimal reproduction project

Single self-contained scene file:
authority_switcheroonie.zip

@Calinou
Copy link
Member

Calinou commented Oct 10, 2023

cc @Faless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants