Godot Version
4.6.3
Question
Surely it is not “any Object”? The documentation is scarce, to say the least.
More concretely: say you have a card game, which does not need real-time movement or anything like that, and you want to add multiplayer capabilities. I know how to implement this myself using RPCs since that is what I would do in other engines: keep a hash map of the cards in play, queue plays on the server, then the server tells all clients to execute queued plays in a fixed order.
For this kind of content, is it worth learning how the MultiplayerSpawner stuff works? The cards have a lot of non-serialisable things attached to them, would it even be possible to synchronise them? If I end up doing the exact same thing I am already doing, then I may as well stick with doing it manually via RPCs.
Pretty sure it’ll work with any Node, most high level RPC is based on node paths, this might include resources but maybe not “any Object” just most, if not all objects.
If you do not need real-time updates then a MultiplayerSynchronizer node may not be that helpful, RPC will do just fine to submit turn info.
A MultiplayerSpawner may still be very useful, it keeps track of what has been spawned and deleted so anyone joining the game late will be caught up on what needs spawning. When given a spawn_function the MultiplayerSpawner is very close to a RPC call that instantiates a new node, with that added catch-up functionality and auto-spawning if you don’t use the spawn_function.
In summation I think it will be useful to learn MultiplayerSpawner for at least player/lobby information, but you are correct that RPCs should make the bulk of a card game.
Thank you! I am going to look into it then.