0 votes


So my game uses a Server project and a separate Client Project at the moment. The Server uses dummy "Player" nodes to pass RPC calls between the server and the alike Player nodes on all Clients.

My primary issue seems to be that my networking methodology is "Lobby" based, as seen in this tutorial: https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html

I am trying to make it so that when one player (client) goes into a level different than other connected players, all previously connected player nodes that exist in the previous level are removed by the server on that player's client. This however causes RPC errors for the player, as the dummy player nodes on the server try to RPC all connected peers and cannot find the now deleted Player node on the client who has changed their location.

My current goal is to manage the connections/traffic between peers uniquely and centrally from the server. When player 1 goes into a different level, they no longer receive RPC from player 2 and visa versa. This would mean that all clients are connected to the server but clients are only peered to clients that are necessary as determined by the server.

The functions "networkpeerconnected" and "networkpeerdisconnected" are one of the roadblocks I am dealing with as they seem essential to peering clients together, but are triggered automatically across all clients already connected to the server when players join or disconnect.

I would like to find the proper methods to de-automate connections between peers and only give them updates to peers that they are expected to have via the server.

Hopefully I'm only making this far more complicated than it needs to be. Any suggestions/critique is GREATLY appreciated :D

asked Jul 2 in Engine by Tinkleberg (68 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 How to use this Q&A? before posting your first questions.