How to disable the global broadcast of peer_connected and peer_disconnected in MultiplayerAPI? I have been researching for a whole day but haven’t found a feasible solution. I would greatly appreciate your help. I want to develop a game similar to “Server” and “Client”, but I found that if there are many users, peer_connected and peer_disconnected will be globally broadcasted, which greatly affects performance. Does anyone know how to turn it off or have other solutions? Thank you.
As I understand it from the documentation, these signals are sent from each peer.
Try to assign each peer its own id, or process the signal in some other way to make it work.
Unfortunately, I cannot provide a code example.
peer_connected(id: int) This signal is emitted with the newly connected peer’s ID on each other peer, and on the new peer multiple times, once with each other peer’s ID.
peer_disconnected(id: int) This signal is emitted on every remaining peer when one disconnects.
P.s. This may not be correct, as I am not very familiar with the documentation.