The Best Solution for Grabbing Title Bar Problem?

Options
When I grab the title bar of the game, it freezes. This is not a real problem as long as I synchornize my data with the master client. But there are somethings that I do not want to synchronize for preventing too much data transfer. For example I have cooldowns which are shown in the GUI. So when the player grabs the title bar, the cooldown bar stops at a certain percentage.

Basically my issue is places where I use Time.deltaTime, can you tell me the most suitable solution for this problem?

Comments

  • This might not be the best, but I thought if I can reach the value that is shown under health stats of lag simulation GUI named "longest delta between disp" I can manage a solution. I actually need not the longest but the current value with each update. I think it is possible to reach it via PhotonPeer but I do not know which method or component lets me reach that value. If I can reach it I can say value > 200ms then pause the game on both sides.

    Still how can I reach that value? Or is there a better way for this problem?
  • Tobias
    Options
    I'm not sure if I understand your problem correctly, so please bear with me if the answer is a bit off.

    The problem is that Unity won't update until you release the title bar. That's not a Photon issue in the first place.
    We found a workaround to keep the connection alive by using a Thread. Those run in the background.

    If there is a cooldown after some effect, you should not need to send a "cooled down" update. Any client which was doing the effect will know the associated cooldown time and can trigger all necessary effects when it ends.

    But locally, the UI won't update, no matter what you do.
  • If a client starts grabbing the title bar, I want other clients know there is no reach for that client for some time. So when that client's unreachable time is greater than 200ms let's say, they will all pause the game and show a "waiting for other players..." window. But I do not know how to reach that client's unreachable time. But I see there is a value shown in lag simulation GUI with the name "longest delta between disp". I do not need that longest delta, since it shows the maximum unreachable time, but the current unreachable time. Can you tell me how can I find that value? This way must be same as Warcraft 3 does. I remember when some player grabs the title bar, the game shows waiting for other players window.
  • Tobias
    Options
    Lag simulation is not related. What you need to track is when you got the last update of some client.
    I assume you are implementing and using OnPhotonSerializeView somewhere? In there, track when the latest update was. In that script's update method, check if the last update was long ago and pause.
    Actually, I guess Warcraft 3 used a lockstep system, which is basically sending a turn ten times a second. If the other player's turns are not available, the game stops. Execution of all such steps is deterministic and so each step is required.
  • Well yes that works! All the time I was expecting something much more complicated :). Thanks for the help.
  • Tobias
    Options
    Maybe this is the moment I should ask for a review in the Asset Store?! ;)
    Glad you could make it work!