1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Glitchiness with Automation turbos

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by vmlinuz, Oct 14, 2018.

  1. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    When I export a turbocharged engine from Automation, the turbo works intermittently - usually, it fails to hold a boost anywhere close to its rating. For some reason, though, it works in the tunnel in Utah.
     
    #1 vmlinuz, Oct 14, 2018
    Last edited: Oct 15, 2018
  2. Ai'Torror

    Ai'Torror
    Expand Collapse
    BeamNG Team

    Joined:
    Aug 29, 2015
    Messages:
    1,547
    What's your FPS when using an automation vehicle?
     
  3. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    Around 30-45
     
  4. Brickturn

    Brickturn
    Expand Collapse

    Joined:
    Nov 2, 2012
    Messages:
    358
    How big are the stutterings
     
  5. Kueso

    Kueso
    Expand Collapse

    Joined:
    Oct 14, 2016
    Messages:
    4,463
    I think its UI lagginess then
     
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    That is all you need to have glitches, especially if your CPU is limiting factor of your performance. Limiting FPS to 30 might reduce glitches as code likes from stable framerates, so if you can't have 60fps, try to have as stable low fps as you can by limiting your fps to value which is typically lowest you see. Game might actually appear smoother by doing that too.
     
    • Agree Agree x 1
  7. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    No guys, it's an issue with the turbos, not the UI! I can prove it! Attached are two 2019 Oldsmobile Phi-85 Jetfires, one with the turbo disconnected. The N/A model is actually marginally faster from 0-60 than the turbo one, even though the turbo model supposedly has 240 HP! The turbo fails to hold a boost, except under certain circumstances (in the tunnel in Utah, for instance). Try them both out (on a proper map, like ECUSA, Utah or JRI) and tell me what you think.
     

    Attached Files:

  8. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Turbo:
    upload_2018-10-15_3-15-9.png

    NA:
    upload_2018-10-15_3-16-2.png

    Trust me, I know what I'm doing, it is your fps and CPU chocking up :)
     
    • Agree Agree x 2
  9. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
  10. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Isn't that what I just did? 7s with turbo 11s with NA. Ok, that was more like 0-62 (0-100kph), really I know what I'm doing, try fps limiter, it 'might' help :)
     
  11. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    Shit, didn't notice. Updated my post.
     
  12. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    That is west coast drag strip, I had graphics on lowest as before I used iGPU, for this test I switched input of monitor and did it with gtx1080, I think it was enough to keep perfect 60fps :p
     
  13. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    No, it still does not work, even with FPS limiter. I am using Utah.
     
  14. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    You have disabled shadows and using lowest graphics settings? Just for a test.

    I post two videos in a moment so you can see how it works here.
    --- Post updated ---


     
  15. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    The mechanicals should be independent of the graphics... Why do you think it's my graphics settings that are stopping the turbo from spooling?
    --- Post updated ---
    Update: it worked... but I shouldn't have to make the graphics look like sh*t, just so I can drive a turbocharged Automation car!
     
  16. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    If you examine turbo lua in game files, you can see it does stuff each frame, whole lua part of the game is tied to FPS.

    When CPU is under very high load, it does not manage to do calculation in time and lua stuff goes out of sync, which causes your turbo not to work.

    For FFB it is 60fps or more where it works properly, same really for everything, game is really smooth and great when your fps stays at 60 and never changes from that, but right when your fps drops below that there are all kinds of quirks.

    Many users have faced this same turbo issue.

    Now reason why it might work better for official cars is that official cars are using bit better turbo setup as overall, there is more room for error so to say.

    If you change wastegate start value in jbeam to be something bit lower, your Automation car turbo probably works bit better.
     
  17. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    That's stupid. It should be tied to the physics framerate, not the display framerate! That is tremendously bad practice - like tying the speed of a game to the CPU frequency, as was often done on early PC games.

    Plus, why are we using a scripting language for the game's internals? Those should be compiled, not interpreted or run on a VM. C, C++ or Rust is the natural choice for such things (and CUDA/OpenCL if you're feeling gutsy). May as well have written the whole thing in JavaScript and run it all in Chrome. BeamNG has no future if this horrible hack does not change. Back to the drawing board you go, @tdev.
     
    #17 vmlinuz, Oct 15, 2018
    Last edited: Oct 15, 2018
  18. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    673
    It's not tied to the CPU speed. Engine simulation is still tied to the physics simulation. It's just that under high load engine simulation is cut back to keep the physics running, which messes with the turbos since they are particularly sensitive to update rates.
     
  19. vmlinuz

    vmlinuz
    Expand Collapse

    Joined:
    Mar 2, 2014
    Messages:
    2,409
    My understanding was that it was tied to the graphics rate for some reason - the bit involving CPU speed was just an example of comparably bad practices in the software industry. (Remember the turbo button? That's why they existed - it slowed the CPU to 4 MHz for compatibility with old games that depended on the PC/AT's clock speed.)
     
  20. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Physics run at 2000Hz, it is not possible to run LUA at 2000 times per second, I think that might be main reason why it is done way it is done.

    They do utilize delta time quite often which takes care of variable framerate, but I think problem comes more from the fact when some calculations CPU can't make happen within time available, that is bit funny as slower framerate is giving more time to calculate, but as CPU is bogged down more it is taking even longer to compute those calculations.

    I'm not sure if some more adjusting will be made to this at some point as it seems to happen mostly when turbo wastegate start and end are very close + few other parameters need to be set in certain range, which Automation exports happen to have.

    Also I have been thinking if it would be possible to tie lua to physics, like to run every 33 physics cycle, but I guess that would have complications too.

    Now if you limit fps so that your CPU single core is not maxing out, you should be able to have turbo working normally even with 15fps, in theory, I haven't tested that, but low FPS alone is probably not enough to cause these problems, or at least should not be.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice