1. Stuck, Having problems with creating your mod? Let us help you: Mod Support

WIP Beta released East Coast Dynamic Traffic (Gull) 0.9.3

Free roaming traffic! Yay, I did it!

  1. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    Get it here: https://www.beamng.com/resources/east-coast-dynamic-traffic-gull.7478/

    I kicked things up a notch with traffic in BeamNG. Now, traffic can spawn on any valid road without the use of manually placed spawn zones. This scenario is a proof of concept, but I have bigger ideas for later.

    Issues or feedback can go here! Let me know what's up!
     
    • Like Like x 11
    • Staff Pick Staff Pick x 1
  2. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,439
    I have a question/suggestion for you.
    Do you think its possible to make a ui app instead of a scenario for us to play in free roam with cars spawning at will in free roam?
    Being able to set a few options like how many vehicles and which configs to load as well could be an addition.
    I love the scenarios they are really fun, laggy but fun.
     
    • Agree Agree x 2
  3. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    That is a really good idea! I've never made a UI app before (and I love scenarios a bit too much!), but perhaps this will be the next thing that I will work on.
     
    • Like Like x 1
  4. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    In a quick test, I pumped up the number of unique AI vehicles to 7. Wow, it got intense; the road was rather busy at times. My CPU got a bit stressed, but the game still ran at around 30 FPS.

    Edit: With more traffic vehicles, a new bug showed up. I'll have to improve my spawn code to fix it.
     
    #4 Gamergull, Feb 6, 2019
    Last edited: Feb 6, 2019
    • Like Like x 1
  5. Projekt535

    Projekt535
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    151
    I'm enjoying this scenario a lot so far, as well as the others you've released. You're doing great work! I agree with crashmaster, if this could be made into a UI app, that would be amazing.

    In the mean time, would you be at all wiling to share how to change the number of cars? I understand I run the risk of crashing the game, but I think it would be fun to play around with. PM me if you prefer! :)
     
  6. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    Sure. You have to move the .zip file to My Documents/BeamNG/mods/unpacked, and unzip it there. Put it in a unique folder (so the path will go like this: mods/unpacked/eca_traffic/levels/...). Open the .lua file and edit the trafficNames line by adding vehicle names. Also, open the .prefab file and copy and paste the vehicles lines. You can rename the object names, models, and configs, if you know how. I hope this works; I typed it on mobile while at work.

    I'll upload a test version with more traffic and bug fixes this evening, so if you can wait, there will be a new file here about six hours from now.
     
  7. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    Ignore my instructions in my previous post, it would've failed because I didn't do any error handling for the vehicles' color switcher. Gimme half an hour and I'll post a test file with 7 AI cars, and with better error handling! :)
    --- Post updated ---
    Ugh, so many posts. Last one for today! Here's the 7!

    http://gamergull.com/East_Coast_Dynamic_Traffic_BETA_EX.zip

    Warning: Quite buggy! I didn't figure out why the Burnside refuses to start at first, and vehicles might rarely spawn into each other. I intentionally left a color array out of the code to ensure that things work, so the Ibishu 200BX gets painted in random colors. Also, the fail screen won't show up unless you honk the horn after you stalled.

    I'm hungry... gonna go eat, then fix some code!
     
    • Like Like x 3
  8. BlueGinge123

    BlueGinge123
    Expand Collapse

    Joined:
    Oct 14, 2016
    Messages:
    2,022
    heyo gull!
    long time no see
    i have an idea- will it be possible to make the code able to spawn modded cars? granted without changing the colors, but like i could be cruising and see a Gladiator around town?
    (it would work that everytime you re-selected the scenario, it would randomize a car, then a config of that car to spawn. rinse, repeat with about 5/6 cars. Not sure if this is possible, but just an idea.
     
  9. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    That should be possible. It would cause a bit of loading lag at the start UI of the scenario (and I don't think I could run the script while the map is loading), but I will definitely try it out. I want to do something similar in my next scenario anyways.

    Optimized some of my code this morning. Right now, I'm working on making the AI aware of what's in front of them, so they won't play bumper cars as much.
    --- Post updated ---
    My AI awareness works :D ! But the code is ravioli, so I gotta clean it up before I do my next release.
     
  10. BlueGinge123

    BlueGinge123
    Expand Collapse

    Joined:
    Oct 14, 2016
    Messages:
    2,022
    “Code is ravioli”
    Lmao
    Best analogy I’ve ever heard for messy code.
    Anyway it’s good to know that that might become possible.
     
  11. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,186
    Actual Dev Team eat your heart out
     
    • Agree Agree x 3
  12. cgjunk

    cgjunk
    Expand Collapse

    Joined:
    Mar 1, 2015
    Messages:
    86
    Well Done!!! It works great, and exactly what I hoping for. This is awesome. I’ll trust you when you say you have more great ideas, because this is great fun as is.

    By the way, I used the super tac-gnat helicopter to scope things out from the air. Now I can patrol the skies of East coast looking for any bad guys to eliminate. Good fun!
     
    • Like Like x 1
  13. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    The script works with air vehicles!? I didn't even expect that to work! That's so awesome.

    I still need to optimize my aware AI stuff. Currently, it's running too hard and causing game sounds to cut out for some reason. Tired now, more work next time.
     
  14. BlueGinge123

    BlueGinge123
    Expand Collapse

    Joined:
    Oct 14, 2016
    Messages:
    2,022
    i dont think the audio bugs are your AI stuff
    recently the audio has gone to crap with more than 5 vehicles out. i think its a Beam problem
     
  15. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    http://gamergull.com/East_Coast_Dynamic_Traffic_BETA_EX.zip

    Updated link. Now with bug fixes and rudimentary "aware AI". Please note, the AI doesn't work as intended all the time. The van in particular likes to plow into stopped traffic anyways. Also, vehicles may be either too cautious or too unaware. I think I need a better way to code it; I might do some AI research online.

    I'll update the repo version later today, likely. I'll add the option to have either less or more traffic. Also, yes, I am slowly working on the traffic app, but it's still tricky for me to understand. I haven't done much coding outside of scenarios.
     
  16. FunGamer25

    FunGamer25
    Expand Collapse

    Joined:
    Sep 30, 2018
    Messages:
    1
    can you mix this mod with the "Random Tour" Scenario? This scenario is outdated, but probably you get it to work and with traffic its would be awesome!
     
  17. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,714
    This is incredible, running perfect 60fps without any issues.

    To have actual traffic, it is really new kind of driving experience that adds a lot to gameplay and East Coast has lot to drive so it is really nice match.

    You might get hired by BeamNG, tdev posted some time ago on forums that they want to make traffic, but gave no promises, but Gamergull deliver traffic already, I think they would get great head start to official traffic by hiring you :D

    Is there simple way to adjust max vehicles, is it variable passed to function or more complex adjustment needed? I was curious of how many traffic vehicles I could run without dropping below 60fps.

    This work you have done adds a ton of gameplay value to many players, really appreciate that you are willing to donate your time to build these scenarios.

    Now I try new beta of aware AI, my only worry is that they are smarter than me :)
    --- Post updated ---
    Aware AI is bit laggy for me, I'm not sure if LUA part of game uses threading or how much it uses that.
     
    • Agree Agree x 2
  18. DankMemeBunny

    DankMemeBunny
    Expand Collapse

    Joined:
    Jun 24, 2016
    Messages:
    1,348
    How can you make this work for maps? This is crazy man.
     
  19. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    Sounds like a fun idea, and it would be somewhat easy, too! However, my priorities are updating this mod and working on the app, so we'll see how that goes.

    Haha, thanks a ton for the praise! I don't think my coding skills are at dev level yet; I do this as a hobby and only have a little bit of experience from school (several years ago). As for adjusting the number of vehicles, I realized that I kinda hardcoded the vehicle names in the .lua file, and I can work on a much better approach soon. I also debugged some things in my head while at work; I'm gonna fix a few AI bugs in a few minutes.

    I might be short on time tonight, but I'll get a fresh update out by the end of Sunday. I'm also gonna try hard to get a traffic app done. Ooh, so many challenges, so little time!

    Edit: I managed to crash the game entirely with a line of code :p . Also, learned something new; deleting a vehicle via code breaks the scenario.
     
    #19 Gamergull, Feb 9, 2019
    Last edited: Feb 9, 2019
    • Like Like x 4
  20. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    249
    Improved the spawning algorithm and fixed yet another bug so traffic is a bit smarter (dang van though, what's wrong with that driver?). The spawning algorithm now uses a segmented line to choose a road node, so it's more likely that traffic will spawn on the same road that you are on.

    Also, cars can now stop at the gas station :D .
     
    • Like Like x 5
  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