VSync is the cause of major AI/Physics problems

Discussion in 'Automobilista 2 - General Discussion' started by Pixel, May 20, 2020.

  1. Pixel

    Pixel Active Member

    Joined:
    Apr 25, 2020
    Messages:
    248
    Likes Received:
    103
    I was having a hard time explaining why some people were saying that the AI was fine, when I (and many other people) weren't able to race them at all. They were all just ridiculously fast, and I could never catch up. On a whim, I disabled Vsync (even though I'm racing in VR), and as soon as I did that the AI fell into place and I was able to race competitively, and it was suddenly fun. The physics overall of all of the cars I tried felt better somehow, but that might have been a placebo. I think there is something wrong currently with the cycles the AI is evaluating at vs the player when Vsync is on, and maybe with the physics too. I've tested multiple tracks and cars and in my case, I can verify this. Anyone else having issues with AI difficulty/speed can give it a try?
     
    • Like Like x 1
    • Funny Funny x 1
    • Useful Useful x 1
  2. Paul Sutton

    Paul Sutton New Member

    Joined:
    Dec 4, 2017
    Messages:
    24
    Likes Received:
    21
    Ahh i don't see how this can affect the AI
    VSync, or vertical sync, is a graphics technology that synchronizes the frame rate of a game and the refresh rate of a gaming monitor. It was first developed by GPU manufacturers as a way to deal with screen tearing, which is when your screen displays portions of multiple frames in one go. That can result in something like the image above, where the screen appears split along a line, usually horizontally. This occurs when the refresh rate of the monitor (how many times it updates per second) is not in sync with the frames per second.
     
    • Dislike Dislike x 1
  3. Paul Sutton

    Paul Sutton New Member

    Joined:
    Dec 4, 2017
    Messages:
    24
    Likes Received:
    21
    • Dislike Dislike x 1
  4. Pixel

    Pixel Active Member

    Joined:
    Apr 25, 2020
    Messages:
    248
    Likes Received:
    103
    I know this. The reason I investigated this issue is that I've seen some mods, like WRC8, where having vsync off screws the evaluation of the physics. I can reproduce this so I know what I'm talking about. Test it on and off and see how the AI responds.
     
  5. Pixel

    Pixel Active Member

    Joined:
    Apr 25, 2020
    Messages:
    248
    Likes Received:
    103
  6. TekNeil

    TekNeil Take me back to the 2.4l, twin 50 weber days...

    Joined:
    Mar 9, 2020
    Messages:
    412
    Likes Received:
    229
    I mean, frame rate can affect the actual timings (Lap time counter), so although I'm not too clued up on this, it perks my interest. Will test [Thumbs up].

    I had a really good post saved somewhere about FPS and how it affected the timings in game, specifically for PC2, but I can't find it just now...If I recall it explained how lap times always tended to land on specific millisecond numbers because of something something...
     
  7. David Wright

    David Wright Active Member AMS2 Club Member

    Joined:
    Mar 12, 2016
    Messages:
    287
    Likes Received:
    161
    • Like Like x 1
    • Disagree Disagree x 1
  8. John Hargreaves

    John Hargreaves Well-Known Member AMS2 Club Member

    Joined:
    Jan 1, 2020
    Messages:
    719
    Likes Received:
    623
    That's a very important capital 'U' there :whistle:
     
    • Funny Funny x 2
  9. Goffik

    Goffik Well-Known Member

    Joined:
    Apr 5, 2020
    Messages:
    472
    Likes Received:
    308
    Like that matters. He posted it as an example. This is not an issue which it completely confined to one game engine. FPS can and does affect physics calculations and other things in some games. Whether it does in AMS 2 I don't know, but it's definitely worth asking the question.
     
  10. David Wright

    David Wright Active Member AMS2 Club Member

    Joined:
    Mar 12, 2016
    Messages:
    287
    Likes Received:
    161
    It DOES matter. From the article

    In Unreal Engine the physics time step has always some relationship with the rendering frame rate,

    It is clear that if you want your physics to behave consistently at different frame rates, you should find a way to separate the scene rendering and the physics simulation so that the physics integration time step is fixed

    This is exactly what racing sims do.
     
    • Agree Agree x 1
  11. jpmmuc

    jpmmuc Active Member AMS2 Club Member

    Joined:
    Aug 29, 2016
    Messages:
    201
    Likes Received:
    68
    In VR V-Sync can't disabled it's enabled on driver level.
    If the switch in the UI brings different timings for the AI this would be a bug.
    I will try if the timing of AI is different with V-Sync en- or disabled. I will also try what's happening with external fps limiter.

    I think it depends how the physics engine is realised in the Madness engine but I can't remember that there was a dependency of physics and fps in PC2. As far as I remember the physics engine is running at fixed 600 Hz and the graphics engine is running at your display speed.

    WRC8 e.g. has this connected so you have to run the game at 30 / 60 or 120 Hz / fps
     
    Last edited: May 20, 2020
    • Agree Agree x 1
    • Creative Creative x 1
  12. Pixel

    Pixel Active Member

    Joined:
    Apr 25, 2020
    Messages:
    248
    Likes Received:
    103
    I have also noticed issues with the AI in 2d with vsync enabled, but I haven't tested extensively, so not sure if there is an issue there too. From memory the speed issue is there too. I never had this issue in PCars2, but the AI in that game is wildly inconsistent between cars, weather and tracks, so it would be impossible to tell.
     
  13. SwaggerJacker

    SwaggerJacker Active Member AMS2 Club Member

    Joined:
    Feb 28, 2020
    Messages:
    139
    Likes Received:
    62
    You should use quotes when quoting.
     
    Last edited: May 20, 2020
  14. SwaggerJacker

    SwaggerJacker Active Member AMS2 Club Member

    Joined:
    Feb 28, 2020
    Messages:
    139
    Likes Received:
    62
    ACC uses UE4.
     
    • Agree Agree x 2
  15. SwaggerJacker

    SwaggerJacker Active Member AMS2 Club Member

    Joined:
    Feb 28, 2020
    Messages:
    139
    Likes Received:
    62
    Turned off VSYNC and tested the Camaro against AI at Ibarra (90%), and they still ran away from me in the corners. They were stable and quick, I wasn't. Granted, settings were default. Still......
    Not trying to discredit your find, I was just hoping it was a quick fix for me. Going to try the AI at Zero percent and see what happens.
     
  16. Pixel

    Pixel Active Member

    Joined:
    Apr 25, 2020
    Messages:
    248
    Likes Received:
    103
    Bummer, are you running in VR? What is your monitor refresh rate or setup?
     
  17. SwaggerJacker

    SwaggerJacker Active Member AMS2 Club Member

    Joined:
    Feb 28, 2020
    Messages:
    139
    Likes Received:
    62
    ASUS Desktop PC I Windows 10 64-bit I Intel i7-4790S @3.2GHz I 12 GB DDR3
    NVIDIA GeForce GTX 970 Thrustmaster TS-PC Racer Logitech Shifter Fanatec V3 Pedals.
    No VR ATM. Doubt my PC could run it. Using a TV in "Game" mode. Refresh is 120.
     
  18. Gevatter

    Gevatter The James May of Simracing AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    1,507
    Likes Received:
    894
    Not Unreal physics, Kunos built their own physics into UE4.

    @Renato Simioni does the framerate influence AI/physics like the OP days?
     
    Last edited: May 20, 2020
  19. SwaggerJacker

    SwaggerJacker Active Member AMS2 Club Member

    Joined:
    Feb 28, 2020
    Messages:
    139
    Likes Received:
    62
    Because he doesn't have enough to do already.
     

Share This Page