Search Unity

real-time multiplayer turn-based

Discussion in 'Multiplayer' started by HosseinSrz, Nov 8, 2018.

  1. HosseinSrz

    HosseinSrz

    Joined:
    Jun 24, 2016
    Posts:
    18
    hi

    i want to make a real-time multiplayer turn-based game ( like a chess ) using unity.
    the game has a limited time and i'm hosting it on my own server.
    what are the cons and pros of different methods like photon, unet, socket programming.
    or is there any better approaches i'm unware of?
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    Technically the only difference in turn based games is that only one player is allowed to issue inputs at a time, basically everything else is the same. Since that is totally in your control it's kind of a moot point.
     
    HosseinSrz likes this.
  3. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    281
    The pro of an existing solution (and I'd like to add SmartFoxServer to your list, of course) is that you don't need to reinvent the wheel and custom-implement lobby joining, buddy list, matchmaking, etc. The con could be the cost.
     
    HosseinSrz likes this.
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Some over generalizations

    Photon Pros: A big feature set, cloud option, well regarded
    Photon Cons: Ongoing licensing costs for anything beyond a CCU level only useful for development, may not be cost effective for the small amount of data required for a chess like game

    Unet Pros: Comes with Unity for now
    Unet Cons: Lots of unresolved bugs even in the LLAPI, Deprecated and will be removed around 2019.1

    Socket class Pros: Develop your own API the way you need, you're not dependent on a 3rd party to maintain your networking solution
    Socket class Cons: You're going to spend weeks or even months just working on creating your own networking solution, time which you could have spent on the actual game

    Mirror Pros: Existing tutorials for Unet HLAPI generally apply with almost no changes, bug fixes Unet never got, simple low level transport that should be more reliable than Unet LLAPI, free as in free beer
    Mirror Cons: None are coming to mind regarding your type of project
     
    HosseinSrz likes this.
  5. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    If you're hosting on your own server, you can also run Photon on it. A 100 CCU license for that is free.
    Is this a two player game?
     
    HosseinSrz likes this.
  6. HosseinSrz

    HosseinSrz

    Joined:
    Jun 24, 2016
    Posts:
    18
    Yes !
     
  7. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    As a two player game is over when one player drops out, it does not matter that much, if the game is hosted by a player or on a dedicated server.
    A benefit of a dedicated server is that, potentially, a player can return to a game when the connection failed.