Lag causing collision

Discussion in 'Bug Reports' started by Laurent Keersmaekers, Jan 11, 2018.

  1. Laurent Keersmaekers

    Laurent Keersmaekers Member

    Joined:
    Jan 11, 2018
    Messages:
    9
    Likes Received:
    3
    Dear,

    Yesterday I started my first ever rFactor2 online race in the WCSLeague. After having a very good qualifying (4th), I was looking forward to the race. However, a bug took me out on lap 1 of the race.

    Bug: The driver in front of me had some kind of lag (I guess due to his connection?), which caused his car to perform a sudden stop (from +- 200km/h to 0 km/h in let's say 0.001s). Since I was right behind him there was no way to escape.

    Possible fix: I guess the connection issue is rather difficult to fix. However, it could maybe be an idea to make a car non-touchable (or turn of collision detection) if d(Velocity)/dt exceeds a certain limit. Let's say > 1000m/s².

    Do you think it would be possible to fix this bug?

    Thanks in advance,
    Laurent Keersmaekers
     
    Lazza likes this.
  2. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,959
    The "Collision Fade Thresh" parameter in the multiplayer.json does something similar.
    "Collision Fade Thresh":0.7,
    "Collision Fade Thresh#":"Collision impacts are reduced to zero at this latency",
     
  3. Mark Fuller

    Mark Fuller Registered

    Joined:
    Dec 10, 2016
    Messages:
    343
    Likes Received:
    99
    Perhaps servers should be able to be set to prevent connections with a ping at a certain level to enter the server??
     
  4. Ho3n3r

    Ho3n3r Registered

    Joined:
    Feb 18, 2012
    Messages:
    555
    Likes Received:
    104
    What ping would that be? My ping is around 190-210 for European servers, yet nobody has ever mentioned lag issues racing with me. I've even raced with @osiris32 on his American servers, where my ping is closer to 300.

    People with <50ms ping but bad jitter have caused numerous issues, though, so you'd be better off looking at jitter than actual ping.
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,547
    Likes Received:
    6,710
    I think the OP has better ideas, where sudden and severe unexpected accelerations could trigger at least a delay in collision detection until the server can work out what's going on. The ping collision threshold doesn't work that well because the collision tends to happen before the high ping is detected.

    The game already starts to simulate a collision between remote cars and walls when they look like they're going to happen (with that apparent collision sometimes cancelled when the remote car miraculously avoids the collision on their end), so there's not many occasions where a car will suddenly and immediately come to a stop on the track that the client isn't already anticipating anyway.

    As much as we can try to avoid connection issues, I think the scope for endurance races etc should at least make erring on the safe side an option. Unfortunately there's probably no neat option when it comes to client lags, as the remote car will lag and then resume where it was, and is telling the server it's going along fine. Then you probably need to have some ghosting to alleviate the "two cars are now in one place" issue, and find a way to let them separate before resuming collisions.
     
  6. Alexandr Meshkov

    Alexandr Meshkov Registered

    Joined:
    Jun 20, 2017
    Messages:
    215
    Likes Received:
    92
    I think that it is not a connection issues. Looks like your opponent has CPU lag, stuttering issue. When ping is high the car not stopping suddenly but it does when purple CPU bar max out. It's different things.
     
    MaD_King likes this.
  7. Laurent Keersmaekers

    Laurent Keersmaekers Member

    Joined:
    Jan 11, 2018
    Messages:
    9
    Likes Received:
    3
    Regarding the "Collision Fade Thresh": How should I use this value, and what are the units? Is there more information available on this setting?

    As far as I understand, it should also help when an opponent has CPU lag?
     
  8. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    I don't think so. Falling out of realtime is not notified to the server. Only ping as far as I know can be used for this.
     
  9. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,959
    The units are seconds.
    If a player has a ping bigger than this number the car turns to no collidable, avoiding accidents with him.
     

Share This Page