Search Unity

Time Synchronization?

Discussion in 'Netcode for GameObjects' started by hard_code, Jun 2, 2021.

  1. hard_code

    hard_code

    Joined:
    Aug 29, 2013
    Posts:
    238
  2. MadMojo

    MadMojo

    Joined:
    Oct 16, 2014
    Posts:
    19
    There is a NetworkTime float property in the MLAPI.NetworkManager component that is a synchronized time representing the time in seconds since the server application started. It is replicated across all clients. Not sure which aspect of the time sync you linked is important to you, but it seems like that would work for you.
     
    hard_code likes this.
  3. RyanGarber

    RyanGarber

    Joined:
    May 20, 2021
    Posts:
    11
    Warning: as of 0.2.0 (develop branch), NetworkTime has been removed without any warning as with NetworkStart(). Unfortunately, with testing, I've found that the Ruffles transport has completely broken due to this change, so I switched over to Unet for the time being. Furthermore, the new property (NetworkManager.ServerTime.Time) is not available on clients, and I'm assuming NetworkManager.LocalTime is not synchronized.

    MLAPI has been misstep after misstep, like a kid's first piece of software where regular, breaking changes are considered part of the development process. Your code will stop compiling and throw errors everywhere, and you are expected to know how to dive through the source code, figure that out, then implement your own solution to replace it.

    Zero documentation on these changes -- not even a commit that explains what happened. No help from the team on GitHub, so I figured anybody who sees this post should be aware. I love this API but it's starting to get a bit old.
     
    hard_code likes this.
  4. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    You shouldn't really use MLAPI in any serious project, it's really early on.
    You're much better off choosing one of the battle-tested and working alternatives that have been here for a long time.
    Pun/Fusion from photon (although fusion is not yet fully released but is looking really impressive), mirror, etc.

    Honestly, even when they finish/are ready for production, by that time you might just be better off using fusion if you're okay with the costs.
     
  5. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    Hey Ryan,
    I already got back to you on Github, I'll say it again here. The develop branch is NOT a release branch and not stable or production ready. MLAPI itself is in an experimental state.

    The reason why we have a public develop branch is because we wanted to be transparent and open about our development process and allow for early feedback. Realistically we cannot develop every feature with 0 bugs and full documentation available on day one. That would be a very inefficient process for us. So please do not use the develop branch unless you are completely fine with un-announced breaking changes.

    When we create a new release we will provide a document which lists breaking changes and provide upgrade paths and we will also have documentation ready for new features.
     
    PutridEx likes this.