- Home /
Photon PUN 2 RTS one time information sharing
Hey, so I'm very new to photon pun and I started with a simple RTS like prototype.
So far I have player movement working with just a transform view. (Not typical for RTS, but whatever)
The map for the game is procedural. So I want the master client to generate a seed and share it with the others. This works right now. I do it with OnPhotonSerializeView
. In there I do something like this:
if (PhotonNetwork.IsMasterClient)
{
stream.SendNext(seed);
}
else
{
if (seed == int.MinValue)
{
seed = (int)stream.ReceiveNext();
GenerateMap(seed);
DisplayMap();
}
}
Which works. But I don't want to send the map seed all the time. Which I think happens. Right?
So how could I share the seed only when a new player connects?
And further on. If I add building placement. How do I share the info that I placed a building one time to all the players?
Sorry if this is a too complex question. But please point me in the right direction. Thanks everyone (:
Your answer
Follow this Question
Related Questions
[PHOTON PUN] Players cant shoot each other? 1 Answer
Photon IK sync 2 Answers
How do I set up multiplayer? 0 Answers