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

MultiplayerSynchronizer using a ton of bandwidth with a SceneReplicationConfig of only spawn #62127

Closed
cridenour opened this issue Jun 17, 2022 · 10 comments · Fixed by #62144
Closed

Comments

@cridenour
Copy link
Contributor

Godot version

v4.0.alpha10.official [4bbe7f0]

System information

Windows 10

Issue description

From my understanding of the new system, a MultiplayerSynchronizer is required on nodes spawned with MultiplayerSpawner to keep their attributes in sync. However, in my game there are nodes that are spawned that only need a single sync.

Given the spawn/sync distinction in the SceneReplicationConfig, I have set up these attributes to sync on spawn. However, even when the SceneReplicationConfig is only spawn variables, there is a huge amount of bandwidth being used as the number of nodes add up. Setting the interval on these synchronizers to 5s will obviously reduce bandwidth but I would think it shouldn't be using any at all.

Steps to reproduce

Launch attached project (I adapted the project from #62027 for simplicity). Use Debug -> Run Multiple Instances.

Run one as a host (using the in game menus) and have the others join. Then watch the network of the host and watch the bandwidth skyrocket as more "static" scenes are replicated, despite not needing any syncing.

Minimal reproduction project

godot-sync-bandwidth-concern.zip

@fire
Copy link
Member

fire commented Jul 9, 2022

@cridenour Someone mentioned this was a good example of using the MultiplayerSynchronizer. Would you be interested in submitting it as a demo?

@aaronfranke Can tell you more if you're interested.

@cridenour
Copy link
Contributor Author

Yea - I would love to. I adapted another issue's project for this one and added chaotic spawning but I can clean it up / start a simple one with a network manager and couple types of spawn/sync.

@GregHilston
Copy link

@cridenour As someone who's experimenting with Godot 4 Alpha 13, and experiencing what I believe is a bug, a simple example of how you have spawn/sync setup would be super appreciated!

Once I work through my issue, I'm looking to package up a repo of the game Pong and write up an example how Godot 4 networking myself.

@cridenour
Copy link
Contributor Author

@GregHilston I think we were talking on Discord about your issue a couple days ago - I don't have any other demo projects right now.

Let me know if you file a bug with a minimum reproduction - I can take a look and test as well.

@GregHilston
Copy link

@cridenour Oh, I apologize, I did not recall your handle. My bad.

Understood, I'll create a minimum project highlighting my issue when I'm back at my desktop. Appreciate your willingness to look it over :)

@cridenour
Copy link
Contributor Author

@GregHilston no worries - I doubt they are even the same.

@GregHilston
Copy link

Oh yeah, I do not think I'm having the same issue as this original comment mentioned. I was more so commenting on a minimum viable networking example. Sorry for the confusion

@nathanfranke
Copy link
Contributor

nathanfranke commented Aug 7, 2022

In case it helps i updated the bomber demo in godot demo projects for the latest multiplayer. PR is still open.

Edit: Now that I'm on my computer, here's link godotengine/godot-demo-projects#753

@GregHilston
Copy link

@nathanfranke okay awesome, thanks for letting me know. I'll look for that example and work through what it does differently than what I do.

Thanks so much!

@GregHilston
Copy link

@cridenour I ended up posting this issue:

#64129

I didn't minimize it, but its just a pong example with not much going on.

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.

7 participants