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

WIP Traffic Tool

Discussion in 'User Interface Apps' started by Gamergull, Feb 12, 2019 at 6:13 AM.

  1. Gamergull

    Gamergull
    Expand Collapse

    Joined:
    Jun 3, 2018
    Messages:
    139
    View attachment 522772

    Work in progress!

    I figured that my traffic app discussion and progress can go in its own thread. The Traffic Tool will allow you to spawn or set other vehicles as traffic on any map. You can even use vehicles that you spawned from the Vehicles menu as traffic. Various other options can be set, such as speed limit, respawn rate, paint color mode, and AI mode.

    I'm hoping to get this app released within a week. I have a list of bugs and features to take care of. I'll post some other interesting things in this thread, such as how my algorithm works and any improvements.

    To clarify, this is not a release thread (yet). However, I may do a little beta test in the next few days! I want to know how this runs on other setups.
     
    #1 Gamergull, Feb 12, 2019 at 6:13 AM
    Last edited: Feb 12, 2019 at 6:20 AM
    • Like Like x 21
  2. Gamergull

    Gamergull
    Expand Collapse

    Joined:
    Jun 3, 2018
    Messages:
    139
    traffic-app-pigeons.jpg

    Look, pigeons!

    Looks like the hard part was yesterday, and things are starting to work just as I envisioned it. I created some new algorithms and they work nicely, now I just have to tweak a lot of numbers for optimal results. My old code for despawning vehicles was a simple distance based one (and it was used as far back as my Hectic Delivery scenario!), but now it's a nifty formula that's adjustable with the respawn rate setting that you can see in this pic.
     
    • Like Like x 8
  3. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    1,633
    Can't wait to use this mod...

    …….In a few years because my laptop sucks...
     
    • Agree Agree x 1
  4. Richard

    Richard
    Expand Collapse

    Joined:
    Aug 19, 2013
    Messages:
    26
    I have never been so excited for a BeamNG mod as this. Thank you, seriously, this is much needed.
     
    • Agree Agree x 2
  5. Gamergull

    Gamergull
    Expand Collapse

    Joined:
    Jun 3, 2018
    Messages:
    139
    Thanks guys :) .

    I spent too many hours on this again, but it looks like I cleared out all the fatal errors. West Coast USA is a nightmare to get working logically, I really think that the map nodes should be revised for the entire map. On the flip side, I'm absolutely ecstatic with how Italy works; you can zoom by tons of cars on the main highway at reckless speeds! It's really cool.
     
    • Like Like x 5
  6. Nicelittle

    Nicelittle
    Expand Collapse

    Joined:
    Apr 27, 2017
    Messages:
    343
    Looks amazing! Can’t wait to give it a go!
     
    • Agree Agree x 3
  7. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,429
    0 regrets in suggesting this.
    Hype, this feels as if a new beamng update has come and it brings a long awaited feature.
    You are amazing. keep up the good work!
     
    • Agree Agree x 2
    • Like Like x 1
  8. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    5,855
    Is it needed to have adjustment for tool per map or is teleporting working universally as long as decal roads are there?

    At WCUSA with older version of traffic scenario, I found out that traffic cars sometimes spawns to wrong end front, so they reverse and turn around, but sometimes they did like to drive to wrong direction completely. Can't imagine what nightmare that is to get to work, but certainly quite bad nightmare I would think.

    @bob.blunderton's city map was also showing some odd behavior because multilane roads, which made AI cars often spawn wrong way around, but I guess your recent update to scenario had something that addresses that, just haven't had time to sit around enough long to do more experimenting.

    Really incredible though.
     
  9. Gamergull

    Gamergull
    Expand Collapse

    Joined:
    Jun 3, 2018
    Messages:
    139
    Thanks for the idea! I almost didn't do it because it would be "too hard", but I ended up learning a lot in just one week. Plus, this means that I don't have to do a scenario for each map. Also, thanks to the community for all of the other forward thinking ideas.

    Yes, it works universally for all AI enabled roads. The respawn rate setting may help for maps with smaller areas or tighter roads.

    I thought I got West Coast's traffic working decently, but the more I test it, the more problems I see. It's stressing me out, lol. I could open the map in the editor and rework all of the AI paths, but I want to program a solution instead. I'm toying with the idea of creating a mini neural network that can observe and save proper AI behavior per decalRoad or node (maybe with the help of the player's driving... or not :p ). Maybe I've watched too many neural network videos, heh.

    Anyhow... debug time!
     
    #9 Gamergull, Feb 14, 2019 at 3:28 PM
    Last edited: Feb 15, 2019 at 11:51 PM
    • Like Like x 3
  10. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    1,963
    A lot of the AI routes weren't set to one-way especially on the highways, as the highways themselves (and also the AI routes which differ from what you see graphically, they are separate) pre-dated the ability to use lanes and define them, and predated one-way roads (which were a requested feature from me + lanes for maps like that).
    @Gamergull I will be contacting you in the future, when I have more roads laid out in their final manner for my city project that I am doing, maybe we can work together here making something cool.
    --Shameless plug follows...
    Come see the sights (but not really the sounds yet) of the Los Injurus City map, coming to BeamNG in 2019! This is a supporter-funded project (as software costs me quite a sum of money, some of it monthly & I am on a fixed income), made possible by about a dozen members of the BeamNG community currently contributing via Patreon.
    Featuring over 45 unique miles of highway, over 100 miles of roads total, dozens upon dozens of new houses and commercial buildings, a new modular subway system (built it yourself if you want to, but there's 2+ miles of it in already), with standard-gauge train-tracks, and a modular road-kit (MRK) that allows any mapper to build realistic city roads in realistic manner. Featuring such iconic buildings such as the Frank Douglas towers from the Brewster-Douglas housing project towers, realistic American schools, The Simpson's house, and will feature other landmark buildings soon. Sick of driving but want some exploring? Enjoy crashing about in the first-of-it's-kind abandoned mall that features two floors of mold, mildew, and neglect ready to share with your vehicle & lots of opportunity for crashing, or take to the skies via the new concrete airstrip! You can even do stunts or go for a drive in the large concrete flood-control-canals inspired by Los Angeles / San Andreas.
    Come stop in and see us! This will be 'the largest city' in BeamNG (since I already hold the record for largest terrain-based map...)
    https://www.beamng.com/threads/a-new-city-map-los-injurus.57055/
    Don't think big, think bigger!

    Thank-you for your contributions Gamergull, they mean something to the BeamNG community and it's highly appreciated not having to drive solo anymore.
    --Cheers!
     
    • Like Like x 2
    • Agree Agree x 2
  11. Gamergull

    Gamergull
    Expand Collapse

    Joined:
    Jun 3, 2018
    Messages:
    139
    Thanks for the shoutout and promo! I love your Roane County map, so I should probably check this out when I get some real free time. Also, yeah, proper lanes are a must, and I'd love better lane support in the game. On a one way 3-lane road, traffic seems to favor only the rightmost lane, and I can't code it to do more (yet, but the BeamNG team should do that, heh).

    I have various bugs and self criticisms to fix now, so I think that Monday will be the release day (plus some waiting on the repo). I have Sunday off, so I can get a ton of work done on that day. I don't even mind, it's freezing outside and I don't want to do anything else.
    --- Post updated ---
    I just spent a few hours making a minimize function for the app. I feel like a noob again.
     
    • Like Like x 1
  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