Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

2d multiplayer card game via lan

Discussion in 'Multiplayer' started by khalidhex, May 6, 2016.

  1. khalidhex

    khalidhex

    Joined:
    Apr 13, 2016
    Posts:
    11
    Hi , this is the first time i try networking in unity , and i need some "guidelines" , my game is a simple two players card game , each one have a hand and the rest is just some kind of drop zones , the hole game is using only "UI" drag and drop mechanism ,and the only different between player 1 and 2 is just that no one can see the other player hand (face dawn cards) , technically all i want is just that the two players share the same screen (scene) :D and i think i can control the game state by implementing a turn-based logic , i have no idea how i can a accomplish that i saw some tutorials but they are all focusing in 3d objects and each player have his own character etc , i know that this is the bad kind of questions but i need a basic guidelines only. capture-20160506-071547.png
     
  2. khalidhex

    khalidhex

    Joined:
    Apr 13, 2016
    Posts:
    11
  3. khalidhex

    khalidhex

    Joined:
    Apr 13, 2016
    Posts:
    11
    Right now the game doesn't have any prefab , is it essential to create one ?
     
  4. ingjjmh

    ingjjmh

    Joined:
    Aug 11, 2016
    Posts:
    2
    hello could you do to hide the cards ?? I want to do the same
     
  5. khalidhex

    khalidhex

    Joined:
    Apr 13, 2016
    Posts:
    11
    you can make a Boolean variable (card_back) ...... if it's true show the back card image (sprite) ... if it's false show the original card face
     
  6. Optimus_Prime

    Optimus_Prime

    Joined:
    Apr 15, 2015
    Posts:
    34
  7. ingjjmh

    ingjjmh

    Joined:
    Aug 11, 2016
    Posts:
    2
    thanks ... but how to flip the cards of the other players and just watch the mine
     
  8. gamecakestudios

    gamecakestudios

    Joined:
    Nov 13, 2013
    Posts:
    21
    You'll need to track which players own each card, and then show something different depending on which player you are.