So , networking is working great in my game. I have set up everything , except there is one problem.
Basically , i use Reliable Delta Compressed type of NetworkViews for my players. The transforms are syncing nice , and plus i am using BitStream.Serialize(ref health) to synchronize the health points.
The problem is , when a new player joins , he only gets the position of the players but not the health. Other players need to change their health (be damaged) or move in order him to get the health info.
Is there any way to force unity to send everybody’s health to the new player without other players needing to move or change their health?
That sounds hacky. What if I have mana,xp,and lots of properties?
Isn’t there any way to make it , when you connect all the networkviews should have no state sync , instead they should send everything , and when you receive all that then they should have compression…
koyima’s solition isn’t all that hacky and makes a lot of sense - all you are doing is syncing the new player with the game manually. You could write a function that can simplify some of this for you.
One thing worth asking yourself though - do you really need to know the health/ mana/ xp of the other players? Unless you decide on showing their health to other players it shouldn’t be necessary for the game to function.