0 votes

I'm building a lobby-based multiplayer game where players and freely connect/disconnect during the match.

When clients connect to the lobby, I notice that the debug terminal is flooded with "Node not found" / "Failed to get RPC" errors from the other players RPC's. After a couple seconds, (presumably when the player nodes are all loaded), this stops and the game continues.

This is mostly harmless, except when my internet connection is poor. When I test the game on my phone's hotspot, the errors may stall before crashing the game.
(Might be worth mentioning is that this is intended to be a browser game, so I'm using the WebSocketClient with the High Level Multiplayer)

My assumption is that this is because the server is trying to rpc real-time info of the pre-existing players onto the newly-connected client before that client has loaded the players.

How can I prevent this from happening?

In my current set-up, the client loads the World scene after it connects to the server as a peer. Then, the nodes in the World scene rpc "initializerpcsender" on the server via the _ready() function.

in Engine by (18 points)

How can I prevent this from happening?

Hard to tell without knowing your code and project. But usually this error occurs when you're broadcasting an RPC to all peers even though only certain peers have the same path as the caller.

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.
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 webmaster@godotengine.org with your username.