vehicle pathfinding/ duplication suggestion

Discussion in 'Ideas and Suggestions' started by Bob4life10, Sep 9, 2013.

  1. Bob4life10

    Bob4life10
    Expand Collapse

    Joined:
    Sep 7, 2013
    Messages:
    10
    as iv seen while playing the alpha, the AI in the game are capable of a very simple pathfinding(?) system where, as from what i can make of it, an invisible line is drawn from the players car to the AI, and the AI follows this line regardless of any props or static meshes in its path.
    im not sure how far into the pathfinding system you guys are in terms of the programming and such, or if its an issue or anything like that. this is just an idea i guess for laying down paths for AI in the game.
    my idea was that, since the maps dont have a set path system in the game due to the time and effort it takes to make sure there are no collisions and such, that the player takes care of recording the paths he wants vehicles to take.
    For Example: a player gets in his car, hits a button to start the "recording" of the path, finishes his run, then saves the path and titles it. Next he spawns a vehicle, scrolls through pathfinding settings past follow and avoid, and chooses, say, "pathset1". then the car instantly teleports over to where the players car started to begin with during the recording, and can begin following the path whenever the player presses the button assigned to the car (or the path).
    this cuts down on the time it takes for you guys, the programmers and map makers and such, to set the paths and ensure that they all work. this way, the paths are determined by the players as passable and clear of any collisions without having to go into the world editor and messing about in the various settings.
    maybe there could even a parameter setting which determines how accurately the car follows the path, from "dead on" to "wrapped around every tree, ever". this will be useful for setting up DIY racing and such, and will take some of the work load off you guys by allowing the players to set their own paths and save them for use later, or maybe even for other by exporting the paths to be downloaded.

    my other idea is that there is a duplication button for your car, regardless of the state it is in, and brings the player back to a fresh vehicle at the original spawn point, while leaving the previous car where it was left.
    i just think this'd be fun because itd add some flavor to races, offroading tracks, and such, because as well as having to focus on driving the track, you'll also have to avoid your previous wreck.
    maybe there could also be a parameter (parameter is a neat word, innit? parameter, parameter) which, determined by the player, sets a limit to how many vehicles can be in the world at a time (as to prevent bogging down your computer), so when that limit is passed, it removes the last car thats been duplicated.
    that, plus a button to delete your old cars, newest to oldest (because the reason you might want to delete your newest car is it might be in the way, instead of having to delete all your oldest ones to get to the one in the way).

    so yah, thats just my suggestion for a simple(?) pathfinding solution and car duplication.
    no idea how difficult this is in terms of coding. it just seems easy to me in layman terms.
     
  2. Ownernator11

    Ownernator11
    Expand Collapse

    Joined:
    Sep 3, 2012
    Messages:
    81
    I like the idea about setting paths for the AI, it would be good for doing races or trying to beat lap times. Maybe you could disable collisions so its like a ghost showing your previous lap or something.
     
  3. pulley999

    pulley999
    Expand Collapse

    Joined:
    Jan 21, 2013
    Messages:
    825
    Forum user Incognito has already made a mod that does exactly what you described with the AI. They have to go slow around corners, though. They aren't good at that bit yet.
    WIP-Waypoints-%28paths%29-for-cars

    Sent from my Nook HD using the actual website.
     
  4. Occam's Razer

    Occam's Razer
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    1,161
    I like the idea of using it for ghost laps, but as an AI pathfinding method, I think it'd be a tad bit messy.

    Firstly, you're overestimating the difficulty of creating a navigation mesh/waypoint path. It can get really rather dull, placing points on maps, more so if the map is large and complex. Still, it isn't that inconvenient, certainly being as straightaways can be aptly simulated using just 2-5 points depending on length. By comparison, it would take at least a few tries of getting the path right (in realtime, no less) for a "path-drawing car" system to get the right line.

    Secondly, your suggested system would place navigation points at the player's position possibly every frame or two. For a reasonably sized raceway, that's potentially thousands to tens of thousands of points, all of which need to maintain variables for xyz position and speed at minimum, and all for one session. I'm not sure if that would max out a computer, but it certainly would cause editing the path in nearly any way to become extremely tedious.

    Lastly, it deprives AI of choices. That's not really a problem on a linear racetrack, but in an open world level, you'd have to tell the AI how to take potentially multiple paths drawn in different sessions to get to their target more quickly (shortcuts in a police chase, for instance), most likely more easily done with a traditional navigation/waypoint mesh.

    Don't get me wrong, I like your suggestion. It's a major step in creating a replay system, and I could entirely see having eons of fun with it until full pathfinding support is implemented. But it has a few too many kinks in it to make it seem like a good end-all AI solution. To me, at least.
     
  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