godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.94k stars 3.22k forks source link

MultiplayerSpawner handle not-at-compile-time-known scenes #6529

Closed flobotics closed 1 year ago

flobotics commented 1 year ago

hi, i am using godot-4-beta-8 .

I dont know if i know everything about MultiplayerSpawner, but it seemed that it can only handle at-compile-time-known resources.

I want to play a game and while playing, i am creating e.g. a mesh (with another tool), and now i load it with rpc() to every client, add_spawnable_scene(), and on server i add_child() the new scene, so that it gets spawned on every client.

The not-known-at-compile-time meshes could also be e.g. headset-models or/and vr-controller-models, for new vr-devices.

The problem now is, when a new client connects, it does not have the newly-created-mesh-resource that the other clients have. So MultiplayerSpawner should send the newly-created-mesh resource first to the new-connected-client and then "spawn" it there ?

But this is not possible right now, or ?

Could this be implemented ?

thx

skyace65 commented 1 year ago

I'm a bit confused, I'm not familiar with coding for multiplayer but your latest comment in issue #6385 seems to indicate that you can send mesh resources to clients.

Additionally you're not using the latest Beta, which can be found here, it's possible multiplayer spawner is designed to handle scenes not known at compile time but there was a bug fixed in Beta 9 or 10. That's not a guarantee but I'd recommend always trying the latest beta before opening an issue about something in it.

flobotics commented 1 year ago

hi @skyace65 ,

yes i can send not-at-compile-time-known meshes (.glb ) to clients, i also described it above (perhaps not understanble enough, sorry), but the thing is, i think so (could be wrong), that MultiplayerSpawner cannot handle it correctly , like describe above (newly clients dont know about .... )

Also, if you read the changelogs on github of newer releases , https://github.com/godotengine/godot/compare/e780dc332a0a3f642a6daf8548cb211d79a2cc45...d0398f62f08ce0cfba80990b21c6af4181f93fe9 there is no change for multiplayer ?

Also to be honest, i use the newest github source and build by my own for debugging purposes.

what was your intention with your response ?

thx

flobotics commented 1 year ago

https://github.com/godotengine/godot-docs/issues/6385