How does Mix of Async/Sync server works in games like chess with friends

Discussion in 'Public Game Developers Forum' started by Umen, Aug 11, 2015.

  1. Umen

    Umen Member

    Dec 16, 2013
    10
    0
    0
    Hello
    the Async part is quite well Understandable, but how do they combine the sync part , when the user see the other player moves
    when he stay in the current session .
    does it make poll requests every N seconds?
    what is the architecture of the server behind such game that mix Async and Sync game
     
  2. Blackharon

    Blackharon Well-Known Member

    Mar 15, 2010
    978
    0
    16
    Game Designer for Ludia
    Canada
    "with friends" type games are pretty much only pseudo synchonous. Completed turns get pushed to their opponent, if the opponent happens to be online at the time it feels ... n'sync (sorry I had to).
     
  3. Umen

    Umen Member

    Dec 16, 2013
    10
    0
    0
    Thanks for your answer ,
    i will try to clarify more .
    what i mean Async is ( again chess with friends example )
    1. user adding Competitors <- async request
    2. user go to Competitor no' 1 make move -> async request
    now here is my problem ( what you call "pseudo synchonous" )
    if user stay in the chess board he can see the Competitor move his Chess Soldier so this is the sync part .
    so while im writing this , i guess when the user in this state the client start to make small polling requests . ... or not .
    also the chat option this is for sure synchonous
    i just what to learn more about this type of architecture .
     
  4. Blackharon

    Blackharon Well-Known Member

    Mar 15, 2010
    978
    0
    16
    Game Designer for Ludia
    Canada
    Either way, the turn is pushed to the opponent. Polling, then pulling if needed, just adds traffic that is unnecessary. Chat is also pushed, why would it be any different.

    Imagine:
    Player A and B in a game. Player B is online, or offline, it doesn't really matter.
    Player A completes his turn. A 'TurnComplete' notification is sent to player B's device.
    Player B receives the 'TurnComplete' notification and, whenever he's online next (or if he's online now), displays the action player a took.
     
  5. Umen

    Umen Member

    Dec 16, 2013
    10
    0
    0
    well this is what im talking about the sync part ,
    when player B is online how does he get the posh notification if no connection is open ? he have to do
    request to get update ,
     
  6. baris

    baris Well-Known Member

    Jul 30, 2010
    252
    0
    16
    I think your app can receive push notifications while it's open (without showing the user). A more complicated alternative would be to implement websockets or use third party supporting them.
     

Share This Page