#Who handles the Multiplayer Synchronizer?

1 messages · Page 1 of 1 (latest)

sand patrol
#

So... the Multiplayer Synchronizer... is it server authoritative? Like does it go through the server, then to the peers? Or is it peers talking to other peers? 😵‍💫

I'm working on a simple multiplayer system, and have been using RPC's for the most part. I started to work on something similar to Unity's NetworkVariable, when I realized a lot of what that's doing is similar to what the Multiplayer Synchronizer does... theoretically.

I read the documentation, and I see things about visibility and configurations... but nothing about who is actually applying these values to what. Any insight?

sand patrol
#

I thought about it, and figured I'd specify what I'm trying to do here. I don't want clients talking to each other. I'm trying to have each client request the server, then the server sends the changes to the clients.

willow sonnet
#

My understanding is that the MultiplayerSynchronizer runs as the authority set on the node. So if the MultiplayerSynchronizer's node is set to the server having the authority (i.e. peer id 1) then it would be "server authoritative".

For example, if you want to make a server authoritative player controller/scene:

  • The MultiplayerSynchronizer authority should be set to 1 for each player
  • The player should have authority over the node which accepts player inputs
  • When a player hits an input, it would send an rpc("any_peer") call to the server
  • The RPC function would set the property configured to be syncronized by the MultiplayerSynchronizer (for example the players position or velocity)
  • The MultiplayerSynchronizer will synchronize the change to each player
pulsar magnet
#

^^ this has been my experience. When the authority is 1 (server), which it is by default, the server passes data to the clients. You can use the synchronizers' signals if you want an update to trigger some processing. Use the one that contains "delta" for vars replicated "on change"

pulsar magnet