- Home /
[Question] Rock Paper Scissors clone - GameManager in Network game
Hi!
I'm new in game development, and now I'm trying to create a Rock-Paper-Scissors clone that can be played via the network. It is a simple game if you do it offline, but networking raises questions which I cannot yet answer. Could you help me a bit?
1) In an offline game, we use GameManager object to store scores, selected shapes, to track if both players selected the shapes etc. What object can we use when the game is a network game? As I understand, it should be a singleton.
2) In offline game, we can specify 2 players in the GameManager like this:
public GameObject player1;
public GameObject player2;
(and then just drag object in the Inspector)
What is a proper way to store players (there should be only 2 players) in the GameManager of a network game?
Thanks!
Answer by NitroGain · Dec 21, 2016 at 11:53 AM
You should read this: https://docs.unity3d.com/Manual/UNet.html It helped me so I don't see a reason why it wouldn't help you.
Answer by InsaneQA · Dec 22, 2016 at 11:07 AM
Nevermind, it turns out that Photon asset has the Rock Paper Scissors demo. https://www.assetstore.unity3d.com/en/#!/content/1786
Cheers!