Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Synchronize Start of a game between 500 players

Discussion in 'Connected Games' started by cibleluxe, Feb 8, 2019.

  1. cibleluxe


    Jan 22, 2019
    Hi !
    I'm working on a game where i need 500 players to start at a specific hour.
    My approach so far:
    It rely on a server with a mysql database.
    I have a table "gamestate", where i set boolean at specific times (start_game, display_score, etc...)
    To start these events on specific time, i use mysql Event Scheduller.
    The problem is i can't rely on them. They sometime happen several minutes late...

    Does anyone has an idea on how to achieve this?

    This is not real multiplayer. I just need to synchronize things at some points in game.

    Thanks for all
  2. g_a_p


    Mar 16, 2015
    Using SmartFoxServer this could be easily achieved, but I suppose it would be an overkill to pay for a license ( although only 25€/month) just for this feature.
  3. Antypodish


    Apr 29, 2014
    What networking solution you are using. Is it TCP/UDP or just web request?
    Joe-Censored likes this.
  4. Joe-Censored


    Mar 26, 2013
    This ^^^

    If you're connecting all players to a central server via TCP/UDP, you'd just have the server send a message to all the clients at the appropriate time for each event. Then your clients would only be off from each other by whatever their network latency is, which is generally a negligible amount of time for something like starting a game (some low fraction of a second). If even that were unacceptable, you'd have to come up with a more complicated solution involving scheduling based on a central time source.
    Antypodish likes this.