Released Hectic Delivery (Gull) 1.3

Deliver the package in a hurry, but watch out for traffic!

  1. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    Get it here: https://www.beamng.com/resources/hectic-delivery-gull.5965/

    Deliver the package to the tourist information centre before time runs out. There's quite a distance to cover, and a bunch of traffic to dodge. Good luck!

    I'm interested to hear your feedback, suggestions, and comments, so post away. I will likely work on updates to this scenario in the next few weeks (if I get enough free time). I also wanna do a guide on how my Lua script works with the objects in the prefab file, so you can use this stuff with less frustration!
     
    • Like Like x 2
    • Staff Pick Staff Pick x 1
  2. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
    I tried it for the first time 30 minutes ago and I'm already addicted to this scenario. 2:35.68 is the first time I managed to get to the finish. 2:34.96 on next try. I somehow want to go below 2:30 mark but I'm not sure if I can do this or if it's possible. Oh, and compliments for the chef for cooking up the best handling D series I've driven in a longer while.
    --- Post updated ---
    16 minutes later I managed to clock 2:30.63. Those damn .63. I choose to channel all my life's energy into trying to lose that .63 seconds.
    --- Post updated ---
    upload_2018-9-27_20-19-10.png
    Ladies and Gentlemen, we got 'em.
     
  3. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    WOAH, that's an insane time! I didn't think that anything faster than 2:35 was possible. Then again, I had a bit of lag to contend with on my runs. Congrats!

    I'll be fixing a few spawn bugs tonight; it seemed that there was a high chance of traffic failure at the end.
     
  4. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
    Yeah I had some lags as well, I just added some old school trickery into the equation :p
    --- Post updated ---
    I lost a drivers' side mirror while squeezing between two cars on one of my runs. That's what I call proximity.
    --- Post updated ---
    upload_2018-9-27_21-53-35.png
    When you fix the lags I reckon I could go even faster. Especially the one on the first curved bridge, the lag happens exactly on my braking point, so I have to brake early or else the game will lag and detect my braking way too late sending my car into the wall.
    --- Post updated ---
    upload_2018-9-27_22-0-17.png
    Nevermind.

    (Yes, I will stop the sh*tposting now)
     
  5. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    Damn, that's impressive! And yeah, the lag starts to happen when the script starts teleporting cars, which happens when you reach that invisible zone before the bridge. For now, I can move that zone to a nice spot, until I find a lag fix.
     
  6. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
    Yeah, I think other zones are in good spots because I didn't feel they interfered with my performance a lot. Anyway, a question: when traffic cars are switched, are they all done at once or one by one? Maybe if you made them teleport one by one the lags would go away or have hardly any effect on the game?
     
  7. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    Ready to upload a small update. I moved and added a few traffic spawn zones, and fixed minor bugs in the code.

    By the way, I just got 2:31 :) .
     
  8. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
    Ok, after the new update the camera goes full retard and shows me the underside of the car and the car itself takes no orders apart from gear input. It just redlines and when i jam in 1st gear it goes straight while the camera is having the time of its life living underground showing me the suspension. Done in safe mode and cleared cache.

    EDIT: I got disappointed, so I went to play another game. It turned out that my controller decided not to do what I wanted it to do. Like, complete clusterf*ck in the menu. Anyways, good old unplug and plug in again worked.
    --- Post updated ---
    Yeah, lags are now in less intrusive places, definitely noticeable improvement.
     

    Attached Files:

    • upload_2018-9-28_19-10-2.png
    #8 PolishPetrolhead, Sep 28, 2018
    Last edited: Sep 28, 2018
  9. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,074
    It was a success, although I did took a shortcut to last checkpoint, rolled after hitting checkpoint and tumbled down the cliff, bye bye security cameras! :D
    upload_2018-9-28_21-7-57.png
     
  10. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
    Same, couldn't get a time under 2:30 without that. Delivery man takes no responsibility for the condition of the package upon arrival.
     
  11. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    LOL! That's funny, but I guess I can add an obstacle there for the next update.
     
    • Like Like x 1
  12. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
    You can add another checkpoint on the last intersection in addition to the final one where the tiny road merges with the parking lot. But honestly, I think it should stay untouched, it's somehow rewarding when you find out you can cut that last corner to shave off some serious time.
     
  13. jetFire55

    jetFire55
    Expand Collapse

    Joined:
    Jan 2, 2016
    Messages:
    39
    Hi, sometimes the AI crashes on their own and Beamng says I failed. Could you rework the code so this does not happen anymore? Thanks
     
  14. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    I can fix that for the next update. I'm thinking of two methods to accomplish this, it's just a matter of which one is more effective and efficient.

    Last night, I was also experimenting and directly modifying the game's Lua scripts (gasp). I found that I can use more traffic cars without increasing lag if I disable their dtSim related calls while they are inactive. Then, I can theoretically swap them in and out of the traffic pool. This means that I would still only simulate 4 or 5 traffic cars at a time, but with more variety. I would need a lot more work on this, as well as finding a way to not screw up anyone else's default BeamNG Lua files.
     
    #14 Gamergull, Sep 30, 2018
    Last edited: Sep 30, 2018
  15. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,074
    That is interesting. dtSim, it is time between frames and is it for finding out how many physics cycles between frames or syncing something for framerate?

    Can be completely something else of course, I'm really bad at LUA :D

    I have suggestion for you, try new map Polish roads with a bus, think about bus routes with traffic, where challenge is not so much in best time possible, but actually maneuvering bus with skill to avoid damage, that might be something interesting new kind of challenge if you ever need one.

    There is also possibility of train encounter etc. I think that if you try that map with a bus, you can get whole load of even much better ideas for more complex scenarios than just getting A to B, I think you have ability, skill and creativity to develop all new kinds of scenarios.
    Who knows, maybe some day there will be scenarios that involve physics puzzles to open doors etc. as you more skilled people learn secrets of the game.

    I'm really looking forward of future developments of yours.
     
  16. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    I believe you're right, it's like an interval passed to the vehicle part and GFX processing.



    The diagram above shows my current traffic management logic. I'll explain it. The prefab file has a bunch of Lua trigger objects spaced apart rather evenly along the route. Traffic cars can teleport to the middle of them, plus they can get their flags and AI modified while within the bounds of the zones. Traffic will always try to spawn 2 zones ahead of the last zone that the player entered. Here, the red zone was triggered by the player; the orange zone is the active zone for traffic relocation. Only 1 car at a time can get teleported to 1 zone. Once the newly spawned car leaves the zone, that zone is ready again.

    Traffic cars are chosen for teleportation based on their distance and interactivity to the player. Examples:
    • Traffic car #1 got teleported to the orange zone and is heading towards to the player 2 zones behind, in the red zone. It can't teleport yet.
    • Traffic car #2 passed by the player a while ago, and will be queued to teleport.
    • Traffic car #3 got too far away from the player, and will be queued to teleport.
    • Traffic car #4 wandered off the main road. I actually put selective Lua triggers on other roads, so that car will be queued to teleport.
    Traffic cars will teleport directly to the origin point of the Lua trigger objects; I placed each zone so that the origin point was at about 1 foot above the road (to avoid buried tires). Additionally, cars will get rotated to match the rotations of the trigger objects. By default, they will go on the lane towards the player. I added alternate zones that hover over the main zones; they are rotated 180 degrees compass wise. Then, the traffic cars have a random chance of spawning going towards or away from the player.
     
    #16 Gamergull, Sep 30, 2018
    Last edited: Sep 30, 2018
    • Like Like x 1
  17. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    I squashed a few bugs. Apparently, the traffic speed limit wasn't working as expected; cars would go crazy fast down the straights. Also, I reworked the traffic damage so that the player is much less likely to take the blame if traffic does something stupid away from you. I have a few more things to tweak, then I'll release another update. After this, more traffic scenarios. Heh, heh, heh...
     
    • Like Like x 2
  18. PolishPetrolhead

    PolishPetrolhead
    Expand Collapse

    Joined:
    Nov 29, 2015
    Messages:
    456
  19. Gamergull

    Gamergull
    Expand Collapse
    Staff Member

    Joined:
    Jun 3, 2018
    Messages:
    322
    New update to wait for. I fixed some bugs as mentioned above, but not the lag. I'm looking into the vehicle initialization code to see what I can do. Later, I will work on an experimental scenario that will really test the limits of traffic in BeamNG. Dunno if it will be a success or failure yet. Fingers crossed.
     
    • Like Like x 2
  20. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    7,074
    One has to leap to know if one can fly, looking forward of this :)
     
  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