Search Unity

General Advice on Multiplayer Game and Best Approach

Discussion in 'General Discussion' started by hunter2379, Jul 20, 2016.

  1. hunter2379

    hunter2379

    Joined:
    Feb 2, 2014
    Posts:
    13
    Good morning everyone, I hope you're all doing well. So quick summary, working on a multiplayer card game where I hope to have 1v1s. I know this is the General Forum but I feel my issues are less multiplayer related and more general planning of a game and how best to implement it. Honestly, any advice would be welcome. I currently have the server and the client running and they can communicate via Command and RPC. I'm looking for advice on the following: Rooms and Gameplay (Card Object, Card Activation)

    What do I mean by Rooms, well I want for Player 1 and Player 2 to play a game independently from Player 3 and Player 4. I figured I can have a list of Room objects and each Room object would isolate the two players it contains. (Or should I make each Room it's own server on a new port and have the main server reroute the player to an empty) This is honestly the big one I'm stuck on. Right now I have a class of Room with an ID, Name, GameObject PlayerOne, GameObject PlayerTwo, and bool isFull and a List<Room> to contain each Room. I doubt this is the best approach.

    The next issue which I forsee having a problem with is how to best go about implementing the actual card game. I plan to have a database of cards and for each card to have a unique ID. My plan was to have a card gameobject template (prefab) and from there pass it the specific card texture of the card the player was going to play. What do you guys think? If I use this approach, whats the best way to communicate each players action to the other?

    My main concerns are how to best go about isolating each individual match and how to best communicate each players actions. The final product I envision is you join the server and see a list of rooms. You choose a room to join and begin your match. The match is turn based and each card would have have an effect that would take place the moment you play it. Like I said, I'm really stuck and hoping that something someone posts will be eye opening and point me down a good path.