Maybe A.I. traffic option?

Discussion in 'Ideas and Suggestions' started by GO_DI_OL_FE, Jan 28, 2018.

  1. GO_DI_OL_FE

    GO_DI_OL_FE
    Expand Collapse

    Joined:
    Feb 12, 2017
    Messages:
    5
    What if in any map with normal roads you could spawn a lot of cars, and then make them normal traffic?
    It would be cool because you could simulate real crash scenarios.
     
  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Have you tested how many cars you can spawn currently without lagging? For me, 6-8 cars is pretty much what I can have.

    You can sort of have AI traffic though, if you add AI Control app in game (press esc while driving, then select Apps from left side menu bar).

    Then try East Coast usa with these kind of settings, you can spawn several cars and have all of them set to AI control like this, then they try to drive around carefully like traffic, kind of. If you have really strong computer, you can have more cars than I can have, but it is probably not really lot, because beams are so hard to compute.
    upload_2018-1-28_17-38-49.png
     
  3. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    487
    What would be better if the devs implemented random (light) traffic where cars get spawned in front of the driver but out of view, making it seem like the world is alive with cars, even if you can only see 1 or 2 other cars at a time. I think this is something that could be implemented, even with the current low limit on the number of simultaneous cars.
     
  4. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,286
    Last time I checked, no matter what, because of how much the game has to compute at one time, and, like @fufsgfen said, beams are hard to compute, so you'd be getting lag spikes from every car getting spawned and despawned.

    If your comparing it to vehicles in, lets say console games, those vehicles, up close, don't look at good as drivable models (Atleast not counting GTA 5, that uses culling/low quality models in the distance), hence the less lag when they are spawned and despawned.
     
  5. Ai'Torror

    Ai'Torror
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 29, 2015
    Messages:
    1,557
    And the spawbing itself would lag out the game quite badly.
    If you wabt the AI to sort of avoid other cars, st it to span mode.
     
  6. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    487
    The thought of spawn lag did occur to me after I posted that. But a way to work around that would be to pre-spawn the traffic cars, and then teleport them around the map as needed to give the desired effect of traffic. Teleporting should not slow the game down, much like restarting your position.
     
  7. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,286
    I don't think them being in your view counts as not lagging. The game code would have to run either way, and that would lag the game slightly either way.

    Also, I'm pretty sure even teleporting, atleast for me, would take a second to work correctly. The game is still having to make that area of the map high-poly, and the vehicle is changing position.
     
  8. 98crownvic

    98crownvic
    Expand Collapse

    Joined:
    Jul 14, 2016
    Messages:
    1,525
    I understand you’re a new member here, but for future reference, it’s a good idea to use the search bar to see if a thread has already been created for that topic, because I think one for this already does. :)
     
  9. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    487
    It would not be the player's vehicle changing position, but the AI vehicles and only those deemed "traffic" and this traffic would be optional. So no need to switch to high-poly environment around the AI car, unless the camera is attached to it. Resetting the position on an AI car should take very little processing, especially when it's out of view.
     
    #9 Unster, Jan 29, 2018
    Last edited: Jan 29, 2018
  10. corvette86_97

    corvette86_97
    Expand Collapse

    Joined:
    Dec 2, 2016
    Messages:
    76
    if you think in a AI option it sound difficult...
    the AI don't know if the other car is a compact car or a big truck
     
  11. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,286
    Ehh, I am just super dumb anyway, I think I meant the wrong thing...

    There wouldn't be a need to switch to high-poly, I think I was thinking about something else...
     
  12. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    I did spawn 9 AI cars to ECA and drove along happily at 60fps, however after a while my FPS started getting lower, at some points to 40fps, at some points I still got 60fps and it was quite rare to see AI car at all.

    It was either because AI cars got close to each other or because they got damaged or then because of something else that does not come to my mind.
     
  13. John Beat

    John Beat
    Expand Collapse

    Joined:
    Apr 16, 2016
    Messages:
    64
    I can have about 20 at a usable framerate around 35 fps or 25 around 20 fps... which is what gta v is for me at max 4k settings but the same settings for 20-25 cars in beam so maybe low settings 1080p i could get 40 cars? O.O
     
  14. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    If you are playing with FFB wheel, then you can't have below 60fps as FFB is not designed to work below 60fps, there will be then issues with FFB.

    Number of cars is limited by your CPU, GPU and graphics settings have little to do with it, unless cars are all packed to small space, so lowering graphics might not have quite the effect you are excepting.


    However it is worth to test, especially at ECA as it is mostly rural roads, then it is kinda realistic to see one car now and then. Or at least would, if they could stop driving into river, that is where I always find pile of AI cars stuck and broken.

    Maybe some barriers could make AI to not turn on such barricaded roads, might need testing.
     
  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