Why do previously connected players properties not appear on newly connected clients even though position syncs?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Yaszu

I’m making a 2d game with multiplayer, and Ive run into this bug where players can only seen animations of players who connected after them. I tried, synchronizing with multiplayer synchronizers, and pinging with Rpc (no idea how that works).

:bust_in_silhouette: Reply From: godot_dev_

It could be many things, and without code I can’t say for sure, but it sounds like when a player connects, you aren’t sending the new player all the information of the previously connected players. It sounds like when a player connects, the player syncrhonizes to all the other players, so continously connecting players will add many to the already connected player but not the new one. If I understand correctly, then your code’s behavior is as follows: below illustrates what I believe you are explaining, where each time step is a new player connecting. On the left is the connected players and on the right is a list of players that player has information of:

  • Time 0:
  1. Player1 :
  • Player 2 connects
  • Time 1:
  1. Player1 : [Player2]
  2. Player2 :
  • Player 3 connects
  • Time 2:
  1. Player1 : [Player2,Player3]
  2. Player2 : [Player3]
  3. Player3 :
  • Player 4 connects
  • Time 3:
  1. Player1 : [Player2,Player3,Player4]
  2. Player2 : [Player3,Player2]
  3. Player3 : [Player4]
  4. Player4 :

If the above is your system’s symptoms, then the solution is to send the ith Player all the infromation players 1 to i-1 when they connect.

If you have a server-client setup, then have the server send the info required to the new client to simulate a new client connecting for each player already connected. If it’s a peer to peer setup, you could just have every player send their info to the new players, to emulate the players connecting, so from the new player’s point of view a set of new player join/connect right after the new player connects

godot_dev_ | 2023-05-31 13:51