This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Godot version:

OS/device including version:
Windows 10

Issue description:
Hello all.
I'm a new Godot user and I'm experimenting the multiplayer API.

I didn't make a lobby like in most of the demos. So the server is always running, and clients connect to it.
When a client connects, a new entity is created for him and authority is granted.
This entity have some sync vars.
So far so good.

But when a second client connects, it immediately receives the state sync of the previous client entity even before the entities are created in this new client, resulting in errors...

Is there a way to ignore incoming packets if the client is in a "joining game" state?
Or buffer the packets and deliver to the target entity when it's instantiated?

Steps to reproduce:
I've made a little separation of concerns so far, so there is a MasterNetwork scene and a SlaveNetwork scene... Some files were divided in BaseClass/MasterClass/SlaveClass also.

I don't know if this is the best approach for Godot multiplayer development, but it's working so far. I would appreciate some feedback on this. Let me know if I'm not being Godotish, in terms of using the engine the way it's meant to be used.

Download the project, open the server and client projects with 3 different Godot editors. (I use symlinks to keep them synchronized).
Don't forget to change the remote debugger port for each editor, and set the main scenes properly (NetworkMaster for server, NetworkSlave for clients)
Play them all.


in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.