AI car crash avoidence idea

Discussion in 'Ideas and Suggestions' started by skyliner_369, May 14, 2014.

  1. skyliner_369

    skyliner_369
    Expand Collapse

    Joined:
    Nov 4, 2013
    Messages:
    40
    this was my idea to make cars not hit walls or tun off cliffs, even try to stay on the road
    thingy.gif
    the colors do mean something, but this is not for me to code.
    green is road, and is to be treated as such, it can also be the parking lot.
    blue is what isn't road, like the median, or a yard, etc.
    yellow is wall, and is to be treated as such. the vehicles should try not to hit the wall hard, but in order to get out of the way of a maniac, take it over red
    red is a cliff, it is to be avoided at all costs, if two wheels of a vehicle passes the barrier, the vehicle is to hold the brakes.

    it can also be used with the waypoints mod for excellent race AI in stead of good AI
     
  2. Stormdrain

    Stormdrain
    Expand Collapse

    Joined:
    Jun 18, 2013
    Messages:
    480
    This... this is actually a really good idea...
     
  3. redrobin

    redrobin
    Expand Collapse

    Joined:
    Aug 21, 2012
    Messages:
    606
    Because of that post, this forum's IQ just went up 10 points. This is an amazing idea.
     
  4. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,084
    hmmm, this is actually a really good way to help with the ai car crashing problems

    (as long as there's a way to disable it though, for those times when you just want to watch the ai go crazy and crash into everything trying to get you, hehehehehehe)
     
  5. go14smoke

    go14smoke
    Expand Collapse

    Joined:
    Oct 9, 2013
    Messages:
    439
    Great idea!! Only ten posts in, too!!
     
  6. juju

    juju
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    76
    This is a good idea, however, I think we can do something kinda better :

    For races in BeamNG we should do something similar to Flatout AI Path system.
    They were using a spline system.


    (imported from here)
    Credits to "Jukka Merikanto" Senior Level Designer at Bugbear Entertainment for the picture (Found it on their forums)

    This picture shows a viewport in 3dsmax, splines which indicate instructions to the AI :

    Green Spline : Race Path; AI should follow this WHILE it can (This should allow 2/3 cars on a row depending on the road width)
    Red Spline : Road limits; AI should NOT go through that, if it does then it needs to find the closest the point where it can go back on the track.

    Those splines could be made in a 3rd Party 3D Editor (3dsmax, Blender, Maya, etc...)
    Export as a mesh file, the game would read the coordinates of the points in that file, so it can send those to the AI.
    Or they could even be made directly in the World Editor in BeamNG (I think it's the best way)

    Additionally, the AI should control the Acceleration/Braking depending on the curvature of the spline it is following.

    This could then be completed by the "Walls" shown in the OP picture, which could be similar to a spline (same function) except it's a 3D Object (Cube, etc..)

    Sorry for grammatical mistakes.
     
    #6 juju, May 14, 2014
    Last edited: May 14, 2014
  7. Occam's Razer

    Occam's Razer
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    1,257
    Because of the way BeamNG works, there would need to be some means by which the AI would consider the vehicle in question. The Moonhawk, for instance, would require more braking time to corner than, say, the Covet. I've long thought this would be necessary for aircraft AI.

    And we would still need to factor in avoiding inter-vehicle collisions. Otherwise, the AI would continue running into one another. Not complaining, that'd be hilarious.

    Lastly, there would need to be a system capable of finding the best route to a destination or object for car chases. But one development at a time.
     
  8. skyliner_369

    skyliner_369
    Expand Collapse

    Joined:
    Nov 4, 2013
    Messages:
    40
    I thought I implied that there would be a path finding system, like the one found in blender for it's game engine; the car would be factored in, I just couldn't think of a color for it, and I didn't want to crowd that render, anyway.

    - - - Updated - - -

    this was already thought of, the race-marked cars would build their own paths, while using waypoints to point them in the right direction. the waypoints won't control speed, only momentary goal. this makes it easy to model a road and track. the way this works is the car draws a vector that sticks to the ground, looks for where it goes off the track, then stretches that over onto the track, then it looks again for the interceptions, and repeats for each interception, until there are no interceptions, afterward the curve would be optimized, faithfully finding it the shortest path to the next waypoint. the ai will also learn as it drives, finding how it travels and compensates, it will, however, know exactly how the car operates in the initial condition, because that would be saved to the initial vehicle files, even how to make that darn bolide cooperate. plus if you build the curve, how would the AI act more like a person than a 'bot? this makes the race way more interesting; more like racing human beings. this AI is designed to have human mistakes; then there is the work on the race curve, when the edges of the road are defined, the crash avoidance, and the goals should be enough to tell the car what to do.
     
    #8 skyliner_369, May 23, 2014
    Last edited: May 25, 2014
  9. IBsenoj

    IBsenoj
    Expand Collapse

    Joined:
    Sep 28, 2013
    Messages:
    818
    Great idea! +1
     
  10. Chernobyl

    Chernobyl
    Expand Collapse

    Joined:
    Aug 26, 2013
    Messages:
    629
    This is a superb idea!
     
  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