Hi, I’m trying to implement game similiar to Uno. I have implemented stuff like cards, deck, and some methods like shuffle, get top card. Now I’m trying to connect two players to the game using Network Manager HUD in first scene lobby. They are connecting but I do not know how to make these players to be positioned on the two ends of the table and they have not seen their cards. Have anyone some idea/solution for that?
I wouldn’t use the NetworkManager for a card game, as the Unet HLAPI wasn’t built for that type of game. The Unet HLAPI is designed around spawning and syncing networked gameobjects moving in a shared environment. A card game just needs to send/receive info about cards and player choices. You just need to send lower level messages with this information, and you can let the client handle the position of players at the table and position of cards from that client’s perspective.
Since Unet is deprecated, I would choose an alternative transport than the Unet LLAPI as well.
If your game implements the concept of “game room”, the logical space where users are playing (different from the lobby where they meet before playing), you should give them an identifier which the clients use to position the players around the virtual table and identify game turns, and the server (if you go with an authoritative server) uses to validate the data they are sending (i.e “player_1” is discarding a certain card: is it pat of his/her hand? is he/she allowed to do it now? etc).