AI pathfinding needs improvement

    Wolverines527

    Warrior/Builder
    Joined
    Aug 10, 2015
    Messages
    363
    Reaction score
    54
    This is just a thing i noticed when using carrier recall the first thing the ai does is plot streight to the pickup point and i mean this literally that includes raming the ship rather flying around it purhaps we can come up with solutions here
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    One solution: add random redirected destinations in interim space. If a ray straight to the target cannot reach the target due to an interfering object (a ship or door in the way), then randomly pick a direction perpendicular to the midpoint of the ray, going about 25% of the distance between the agent and the target. If that is blocked, repeat from the midpoint of the random ray. This way, an AI agent (fleet ship) will continue trying to find a path that may or may not get to the target. This could be used on all sorts of things, such as NPC astronauts in space stations.

    What other algorithms might work, other than simply having a large, complicated phantom-rail system?
     
    Joined
    Feb 27, 2017
    Messages
    27
    Reaction score
    6
    Schine has stated they're looking into methods to calculate a convex hull shape for reactor design, I think this could be used to improve pathfinding for carrier recall. That is, a straight ray could be drawn from the ship to the pickup point, and if it intersects this convex hull calculated for the ship, the path is re-routed around the perimeter of the shape until it either reaches the pickup point or an unobstructed path close enough to the pickup point to stop pathing around the perimeter.
     

    sayerulz

    Identifies as a T-34
    Joined
    Nov 16, 2013
    Messages
    616
    Reaction score
    179
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Honestly though, how many games where the AI is ever asked to pathfind around any sort of obstacles where the AI doesn't get stuck on random crap all the time?
     

    StormWing0

    Leads the Storm
    Joined
    Jun 26, 2015
    Messages
    2,126
    Reaction score
    316
    • Community Content - Bronze 1
    hmm maybe have ships looking for docking area orbit until the docking point is both active and in sight from its current position? Could do this for AI fleets near stations so they can dock and not try to ram through the things. >.>