I am currently working on a horror survival game with auto generated maps. Within the Multiplayer when connecting, the user gets into a lobby where he can see the other players and the selected world of the server. Within the lobby the user can select or even generate a new player which he wants to use to join the game. The user can join at a later point although the game on the server is already running. I create the player and initalialize the world only when the user starts from the lobby into the game.
Because the server is already running and broadcasting updates for its player and some map nodes I get error messages like this:
E 0:00:29:0278 _process_get_node: Failed to get path from RPC: Game/World/Spawn/1728661527/Equipment.
. Is there a way to drop rpc-calls for a specific part of the tree until it's created (e.g. when the user joins with his selected player into the game an loads the world)?
<C++-Quelle> modules/multiplayer/scene_rpc_interface.cpp:165 @ _process_get_node()
The other solutions I have in mind:
1.) Use only singleton nodes or nodes which are automatically are generated when a client connectets for rpc calls.
2.) Create everything on every client when its created on the server and just set the visiblity of different nodes according to the gamestate.
What would be the best solution on your opinion?
(Godot 4.0.3 Networking)Drop rpc call if node doesn't exist yet?
The best solution would be to use singletons or nodes that are automatically generated when a client connects for RPC calls. This allows the clients to have a consistent view of the game world, and also ensures that they don't receive any redundant or unnecessary data from the server. Additionally, this approach allows the server to only broadcast the data that is relevant to the clients. For example, if a player is joining late, the server can only broadcast the changes that have occurred since the player last joined.