R60 Combat Networking Changes

Discussion in 'Developer Depot' started by Lord Subtleton, Nov 19, 2018.

  1. Lord Subtleton

    Lord Subtleton SotA Dev Moderator SOTA Developer

    Messages:
    790
    Likes Received:
    1,083
    Trophy Points:
    93
    We are in the process of improving the player experience for combat when there are multiple players in the same instance.
    THE PROBLEM: As many of you may know, much of the combat system runs peer-2-peer. So actions initiated by one player happen on that player's machine first, and then propagate to the other clients via networking messages*. Another important detail: One client in an instance (the "master" client) controls the AI's. Actions initiated by the AI on the master client might be delayed by 200-400 ms in reaching your machine. It's always best to be on the master client.

    THE GOAL for this release was to reduce the impact of peer-2-peer latency, so that players have a more consistent play experience, regardless of which machine initiates actions.

    The SOLUTION involves accounting for latency in the action timing.
    First, a bit of background. Every skill use has two parts: a wind-up and an execute. During the wind-up, the casting actor plays an animation or starts charging an effect or something. The duration of the wind-up is determined by the action and the accompanying animations. The execution of the action is when things really happen: sword swings, missiles fly, and damage is applied (and any other effects).

    First change: The initiating client broadcasts "action starting" to all clients _including itself_. We made a change so that the initiating client visually starts the action immediately, but now waits for the message to bounce back from the server before logically starting the action. This means that all clients now receive notifications about an action starting at nearly the same time. Also, actions are received and processed by all clients in the same order. (Added consistency.)

    Second change: All clients estimate the elapsed time since the message was sent and adjust (reduce) the windup time accordingly. In most cases, the wind-up time completely covers the latency. On slow connections, a player may see a small delay in windup duration due to a longer client-server round trip time.

    CONCLUSION: Now the timing of actions on all clients is much closer to being in-sync, and the advantage to being on the master client is much reduced. If you were wondering about the stability of multiplayer combat over the first weekend of the release, you now know why. This is a major undertaking that affects many areas of the game, so it's taking some time to work out the kinks. What's next? We are looking to improve the consistency of combat by reducing the impact of player/creature positioning being different on everyone's machine. More on that later.


    * Client machines aren't directly connected. Broadcast messages from a client actually go to the server first, and then get distributed to the clients. So the latency of the message include client -> server, plus server processing time, plus server -> client latency.
     
  2. that_shawn_guy

    that_shawn_guy Avatar

    Messages:
    679
    Likes Received:
    1,707
    Trophy Points:
    105
    Location:
    virginia
    time keeping is the 2nd most difficult thing to do with computers.

    thanks for all the effort!
     
    Chrystoph Reis and ldykllr like this.
  3. Steevodeevo

    Steevodeevo Avatar

    Messages:
    1,269
    Likes Received:
    2,371
    Trophy Points:
    113
    This is the 5th or 6th Unity crash I've had in a couple of days. I was in Ravensmoor and performance was sluggish, it felt wrong immediately. I engaged with a couple of yellow and the orange mob, which I can normally handle with some effort if I carefully pull and split them but died rapidly several times and I felt like I was fighting in treacle, something in the combat just didn't feel right either. The bowmen were warping away at incredible speeds and I was disappointed with this as I thought it had been addressed.

    Then this..
    [​IMG]

    I'm done for a while, I'm a little tired out with the uphill struggles to play and enjoy. I will keep an eye on the forums every now and then, especially this and similar threads and the feedback received regarding the success, if any of improvements over the next several weeks or months. But for the moment I'm taking a SOTA sabbatical as it simply isn't playable consistently enough for me with stability and performance issues making my efforts a struggle.
    Good luck to the Devs in their efforts to resolve the problems.
     
    StarLord, Ataniiq and that_shawn_guy like this.
  4. Vladamir Begemot

    Vladamir Begemot Avatar

    Messages:
    5,020
    Likes Received:
    9,469
    Trophy Points:
    153
    Gender:
    Male
    A major undertaking, best of luck!
     
  5. Toadster

    Toadster Avatar

    Messages:
    858
    Likes Received:
    1,735
    Trophy Points:
    93
    Wonderful idea. Hope it works out
     
    FrostII likes this.
  6. Humbert_Humbert

    Humbert_Humbert Avatar

    Messages:
    360
    Likes Received:
    678
    Trophy Points:
    43
    I really appreciate the openess explaining the problem. This helps a total fool such as myself realize it is more complicated than it seems.

    Thanks!
     
  7. Vladamir Begemot

    Vladamir Begemot Avatar

    Messages:
    5,020
    Likes Received:
    9,469
    Trophy Points:
    153
    Gender:
    Male
    It's crazy complicated. Entire books written about it complicated.
     
    Sean Silverfoot and Vaiden Luro like this.
  8. Doctorface

    Doctorface Avatar

    Messages:
    179
    Likes Received:
    317
    Trophy Points:
    30
    Gender:
    Male
    Location:
    Fayetteville
    I thought combat felt a bit weird lately. Cool beans!
     
    Chatele likes this.
  9. Daxxe Diggler

    Daxxe Diggler Bug Brigade - Bug Hunter

    Messages:
    2,631
    Likes Received:
    5,596
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Good luck team! If you need some testers before you go live, maybe you can throw up a new build on QA sever for us to take a run at?
     
    Sean Silverfoot likes this.
  10. Sorthious

    Sorthious Avatar

    Messages:
    1,135
    Likes Received:
    1,358
    Trophy Points:
    113
    This is why I don't like the p2p model!
     
    Chatele likes this.
  11. Vladamir Begemot

    Vladamir Begemot Avatar

    Messages:
    5,020
    Likes Received:
    9,469
    Trophy Points:
    153
    Gender:
    Male
    @Lord Subtleton , just for curiosity, how will this affect our ability to do the Macarena manually synced?

    We were doing it last night at the dance party, and as usual it was very tough to get right. I would think I was in time with everyone else (looked that way on my scree) and look over at Viola's screen and I'm one or maybe two seconds off. She'd think she had it nailed, and on mine was way off.
     
  12. Sorthious

    Sorthious Avatar

    Messages:
    1,135
    Likes Received:
    1,358
    Trophy Points:
    113
    Really?! Since when is dancing a time sensitive action? Combat situations are what's important with regards to latency! The audio from instruments might make sense, but visual animations for dancing, I would think, would be last on the list of priorites for making sure synchronization is working properly. Also, unless you start at the exact same time, you will never be in synch.
     
    Cordelayne likes this.
  13. Sean Silverfoot

    Sean Silverfoot Avatar

    Messages:
    2,298
    Likes Received:
    6,392
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Hudson Valley area of NY
    Seriously, this isn't a combat only game, it's a sandbox game. What may NOT be important to you, IS important to others. Besides Vlad was giving an example of the difference he saw. Valid input IMO
     
  14. Earl Atogrim von Draken

    Earl Atogrim von Draken Avatar

    Messages:
    6,105
    Likes Received:
    11,635
    Trophy Points:
    165
    Gender:
    Male
    I honestly would prefer my combat fixed before whoever's dancing. That being said, I wouldn't be surprised if both issues are connected at some point.
     
  15. Sean Silverfoot

    Sean Silverfoot Avatar

    Messages:
    2,298
    Likes Received:
    6,392
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Hudson Valley area of NY

    Yep, would agree with you there. My point wasn't just about dancing, it's about anything that gets bashed as not important if it isn't combat. I know some players that craft only. *shrugs*
     
  16. Earl Atogrim von Draken

    Earl Atogrim von Draken Avatar

    Messages:
    6,105
    Likes Received:
    11,635
    Trophy Points:
    165
    Gender:
    Male
    Eh, good point.
     
  17. Silverti

    Silverti Avatar

    Messages:
    58
    Likes Received:
    82
    Trophy Points:
    8
    Is it actually a sandbox game? What brings people to play this game, dance parties or slaying dragons? How has your ideal for this game worked out so far? I would say that the vast majority of people coming to the game care about combat, not dance parties so that should be the priority.
     
    Chatele likes this.
  18. Sean Silverfoot

    Sean Silverfoot Avatar

    Messages:
    2,298
    Likes Received:
    6,392
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Hudson Valley area of NY
    Yes it is.
    Both
    Love the game and look forward to continued work on it Been playing since R1
    Love folks that speak for everyone (Not)
    Disagree on priorities as stated above, and trust the Devs to handle it evenly as they have been doing.

    Enjoy the game........
     
  19. Sean Silverfoot

    Sean Silverfoot Avatar

    Messages:
    2,298
    Likes Received:
    6,392
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Hudson Valley area of NY
    Actually I want to expand on that comment. The REAL game is this, you come into the game as "yourself", You follow the path of the Avatar following 3 different paths that lead you to the Path of The Oracle and eventually the Shroud and being judged by the Oracle. Along those paths one has to make some decisions, these decisions should reflect your own personal views. One needs to travel between the different paths getting one's skills better able to handle the obstacles along those paths. The estimate time this takes is about 40 hrs of game play last I heard. Now one could play something else and then come back for E2 and later episodes or stay around.
    That takes us to the sandbox portion of the game. Fishing, crafting, agriculture, music, books, advanced combat, PVP, plays, radio stations and other social avenues such as POT's offering unique features.

    All IMHO, of course.

    Enjoy the game.......
     
  20. Barugon

    Barugon Avatar

    Messages:
    10,817
    Likes Received:
    17,370
    Trophy Points:
    153
    Gender:
    Male
    This is how I play the game. I even tried to make my avatar look as much like me as possible.