Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Netcode - time issues

Discussion in 'NetCode for ECS' started by anihilnine, Nov 13, 2020.

  1. anihilnine

    anihilnine

    Joined:
    Jan 29, 2016
    Posts:
    27
    Hi guys,

    I've been looking at netcode and had some questions about timing for my RTS game, where having a 'live' twitchy game is less important and having a large viewfield is a factor.

    How can I pause the game? My first thought would be to disable the server simulation group but I'm not sure that would work out?

    How can I get the clients running 0.5sec behind the server? That would give the client some time to get late messages. I see netcode has support for 'interpolation' but I haven't been able to observe the clients running in the past.

    How can I disable the "catch up" mechanism for unity physics when used with netcode. My client and server are both playing catchup and dying.

    How can I slow down the simulation instead of a physics catchup, would be nice if the units all slowed down but the FPS & network traffic were not affected.

    How can I slow down the game in the event of a player not having critical data yet, we could just wait for them to get it before continuing on. All players could be limited by the slowest player.

    Thanks!
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    You need explicitly control frequency of systems update. I. e using fixed update steps, where you can change, how often systems update. So for example you słow down the physics systems, but not user inputs related systems.
     
  3. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    988
    That sounds like a terrible player experience...
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    It is normal for RTS games, when players start lagging.
    For example you can play Zero-K with 32 and even up to 64 players and thousands units.
    In bigger map is not unusual, to slow down the game overall, so other don't have lag.
    Changing speed from 1.0 to 0.8 factor does huge performance difference.