Setting up multiplayer

Nice!

In that video there are lots of potential problems. It only works because the world scene isn’t created until the client has joined. Meaning the multiplayer id is set properly.

If the world scene already exists before joining everything is authed locally. And won’t be updated automatically.

I also don’t think it is wise to make the client spawn its own instance on joining in the world ready function, and use the multiplayer spawner to just handed remote instances. You will still need a respawn mechanism anyway, if death is a feature.

I eventually plan on having the multiplayer spawner have a “set” condition attached to player spawn.
if spawned(id) = null:
spawn body()
set spawned(id) =true
something like that? that way the player always has a body. The condition would star as null when they join the server and if they die? something like that?

as for the world spawning it. I followed the video “loosely”. I have the players spawning from a multiplayer spawner. I just dont get why get_tree().change_scene_to_file(“res://Origin.tscn”) made such a large impact. All it did was remove the world scene.

I technically had it set up that all instances ran as “Host” first, and then one of the other host would join another as a client.
Host 1-Host 1
Host 2-Client 2
kind of thing?
so the world scene 100% existed before anything else in the main host.