Hello everyone,
I am currently learning networking in Unity for a university project and I slowly feel like I am getting a good grasp of the basics.
I am implementing a turn based digital Trading Card Game. My idea was to handle the decks server side until a player actually needs to see the cards. Now instead of spawning the cards for all players and hiding them for the opponents when they are drawn I want to implement it like this (for anti-cheating and whatever reasons, imo this makes more sense):
[Server]
void OnCardDraw() {
card.MoveToHand();
NetworkServer.Spawn(card) //FOR OWNER OF CARD ONLY
}
[Server]
void OnCardPlay() {
card.MoveToField();
NetworkServer.Spawn(card) //FOR OTHER PLAYER
}
So now my question is: Is this possible? If yes, how? If not, how would you handle this so the other client gets the smallest possible amount of information about the card. For now I don’t care if the opponent can see my hand with the backs of my cards.
I’m really hitting a wall here
Thanks a lot in advance! I really appreciate it!