Intraship docking waypoints - teaching AI "how" to dock

    Should such a system be eventually included in Starmade?

    • Should be implemented as-is

    • Needs a lot of revision first

    • No way


    Results are only viewable after voting.
    Joined
    Oct 17, 2013
    Messages
    40
    Reaction score
    77
    For a very long time, we have been interested in obtaining a "dock with" command for our AI drones and fighters/miners, etc. However, a ham-handed "dock with" command in the current AI only appears to be possible if the docks are mounted externally on any given ship and are easily accessible to the AI entities.

    However, for those of us who spend large amounts of time designing elaborate interior corridors and hangers to dock our fighters/miners safely inside our mother-ships in sheltered hangars (carriers, mining barges, titans, stations/hangars, etc.), it seems very unlikely we'll be able to coordinate organized docking maneuvers for AI ships.

    Enter "docking waypoints."

    During Build-mode, players will be able to create "waypoint series," a package of information that is stored as part of the ship blueprint/individual ship entity. Each WP series will have information associated with it: 1) what type of WP series it is (dock path, escort position, patrol path) and 2) a list of associated waypoints (and their respective priority -- WP 1, 2, 3, 4, etc.).

    Then, selecting a WP series to add WPs to, players will designate positions (in the blueprint's coordinate system) by marking physical blocks in the positions they wish to designate. Note: since the WP block marking is stored as position info and not block info, the blocks would need to be afterwards removed to allow ships to fly through that point in space.

    Players should afterwards be able to access a list of WPs associated with any given series so as to rearrange the WP priorities (in case WPs are added/removed from the series).

    For docking WPs, a docking module/turret docking module should be designated so that the ship will (if <10m away after clearing the last WP) automatically attach itself to the docking module. Docking waypoint series can be toggled as "reversible" or "non-reversible" to differentiate between docking and undocking maneuvers (Some docks have craft undock the same way as dock, just in reverse. Others have a specific docking in-path and a different out-path).



    Escort WPs will define a path for craft to fly along to enter escort formation. At the end of these paths, crafts will attempt to mirror the mother-ship's orientation and speed and will attempt to maintain the escort position. These paths can optionally include a list of WPs for "leavin escort" if the player wishes them to leave escort formation in a specific manner.

    Patrol paths are WP series that are similar to escort patterns but are flown in a constant loop. The ships will attempt to arrive at the first WP to begin the escort pattern and will fly the entire path. At its conclusion, they will find the first WP and rerun the path. They will continue to do this until commanded to stop.



    Concept Strengths:
    1) Simple System for Programming Docking Maneuvers
    No scripts necessary. Because ship attitude, roll orientation, and speed are set at each waypoint, docking AI craft read what to do from the pre-defined waypoints themselves. Assuming their size allows them to clear the player-built corridors/hangars, craft should be able to read docking instructions on-the-fly allowing effective docking on the first attempt.

    2) Escort Positions
    Have you ever wished you could have your smaller craft follow your mother-ships with a predefined escort formation? One that allowed your craft to engage enemy craft during an attack and then return to fly alongside you in their proper positions? These waypoints (being information attached to the ship blueprint) would allow you to define escort positions for your fleet carriers and colony ships, keeping those pesky fighters and bombers from hitting that annoying turret blind-spot that you designed.

    3) Internal Docking
    Obviously, such a system would teach AI how to properly enter your ship to dock.

    4) Traffic Control
    If you have a station in a field of asteroids (generated, or player-built), you could define an external traffic pattern to allow your AI to properly navigate to hangars.

    Potential Issues:
    1) Your ship must be motionless
    If your mother-ship is moving, AI-controlled entities who have been commanded to dock may collide with your ship while attempting to reach their series of waypoints. Even worse, AI-controlled ships may make it through the first, outer waypoints and be moving towards your inner waypoints when you reorient to where they are farther out from your ship that the outermost waypoint. In all cases, there must be a way to "update" the AI's order depending on which waypoints are nearest/next on the list to fly to.

    2) Telling AI-ships which dock to fly towards
    Just telling a ship to dock with you is not enough; ships may collide with your mothership or fail in docking if they are not sized properly for the dock they attempt to enter. There must be a way to designate specific docks/docking waypoints when commanding ships to dock (for example, Dock 1 has a waypoint chain for a small dock on top of your ship, Dock 2 has a waypoint chain for a large dock on the bottom of your ship, and you want a large ship to go to the large dock, not the small one). Adding a subcommand to the "Dock" command may allow you to designate which pre-built docking waypoint path you wish the ship to follow.


    The Issue of Moving While Docking:
    Docking ships can attempt to match their mother ship's speed and direction of acceleration. This will normalize their speeds and allow the docking maneuver to happen while moving. But buyer beware: make sure your mother ship cannot/does not outrun (accelerate faster) than docking ships... or else they may not be capable of matching the main craft's speed.

    The Issue of Multiple Docks Tied to One Docking WP Path:
    If you tie multiple docking modules to one docking WP path, only one ship will follow the docking pattern at a time. The others will wait their turn. At the end of the docking path, assuming the docking module is easily accessible and close enough to the WP path terminus, the craft will find the next available dock and settle in.

    These are just a few of the initial applications this system can provide. If anyone has any suggestions to fix some of the issues or refine the concept, please post!
     
    Last edited:

    Winterhome

    Way gayer than originally thought.
    Joined
    Jun 29, 2013
    Messages
    1,929
    Reaction score
    636
    Easy solution to the movement issue: Align AI ships that are utilizing internal waypoints to the ship. That way their movement is in relation to your ship, not to the universe.
     
    Joined
    Oct 17, 2013
    Messages
    40
    Reaction score
    77
    Easy solution to the movement issue: Align AI ships that are utilizing internal waypoints to the ship. That way their movement is in relation to your ship, not to the universe.
    I agree, pairing the AI ships' movements to the mother ship would keep them motionless relative to the main craft. However, what about when you are flying the mothership at the server speed limit? Would not the AI ships be unable to make any movement along the WP path if the next waypoint lies along the same direction as the ships are travelling (at max speed)?

    Also, what happens if the AI ships are incapable of accelerating as quickly as the mother ship? If the mother ship accelerates forward faster than the AI, wouldn't the AI still potentially collide with the main ship?

    You could make it so that the AI ships stay motionless relative to the main ship and have this override the AI ship's movement stats. I'd worry that this would be "cheaty" though, as you could attach a very slow ship to your waypoint series and have it gain the speed capabilities of the main ship.
     

    Winterhome

    Way gayer than originally thought.
    Joined
    Jun 29, 2013
    Messages
    1,929
    Reaction score
    636
    If you're outrunning your AI, then that's a design issue rather than something the game absolutely has to remedy, I feel.
     

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    I agree with the above. If you want drones, they shouldn't accelerate at a faster rate than the mothership.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Simple solutions:

    Make navigation blocks like area triggers (not the controller) invisible outside build mode.
    > Link them like logic (not neccessarily master-slaves, just a connection).

    The problem I see is that either everything can only fly along one path from dock to out of your ship and from there back to the dock.
    > You create a HUB-Zone from which everything a ship can fly from/to is connected.
    > Everything else requires path-finding algorithms (shortest way).


    What happens if 2 ships dock?
    Or if one ship wanna fly from dock to out of the ship space and another from out of the ship space to the dock, potentially colliding with each other?
     
    Joined
    Aug 18, 2013
    Messages
    196
    Reaction score
    14
    Just link more docking blocks to the path block. Only one ship can access the path from point A to point B, meaning that any other ship which wants to dock/undock and wants to use that path would have to wait.
     
    Joined
    Oct 17, 2013
    Messages
    40
    Reaction score
    77
    If you're outrunning your AI, then that's a design issue rather than something the game absolutely has to remedy, I feel.
    @Azereiah Good point. :)

    I agree with the above. If you want drones, they shouldn't accelerate at a faster rate than the mothership.
    @Vanhelzing As above!

    Simple solutions:

    Make navigation blocks like area triggers (not the controller) invisible outside build mode.
    > Link them like logic (not neccessarily master-slaves, just a connection).

    The problem I see is that either everything can only fly along one path from dock to out of your ship and from there back to the dock.
    > You create a HUB-Zone from which everything a ship can fly from/to is connected.
    > Everything else requires path-finding algorithms (shortest way).


    What happens if 2 ships dock?
    Or if one ship wanna fly from dock to out of the ship space and another from out of the ship space to the dock, potentially colliding with each other?
    @NeonSturm I apologize, I probably wasn't super clear in the original description. You would be capable of designating multiple WP series, one for each docking module on your craft (if you wanted a specific docking path for each docking module). You would create WP series, one for each docking module and link each docking module to its specific WP list. Thus, you could have separate docking paths for each dock - a different path for each ship attempting to dock. This would allow you to dock multiple craft. You would command a craft to dock and tell it which docking path to take.

    Furthermore, as mentioned, you should be able to mark any docking WP path to be reversible/non-reversible so that you could define a separate exit path when undocking. So theoretically, you should be able to have individual undock paths for each docking ship.

    Just link more docking blocks to the path block. Only one ship can access the path from point A to point B, meaning that any other ship which wants to dock/undock and wants to use that path would have to wait.
    @SapioiT That's actually a very interesting approach. I suppose that if the docking modules were close enough to each other and could be reached without running into any other obstacles, you could like multiple docking modules to one WP path. Thus, all ships would wait their turn, follow the same path, and pick a docking position based on some arbitrary priority.
     

    Mariux

    Kittenator
    Joined
    Jun 20, 2013
    Messages
    1,822
    Reaction score
    658
    • Purchased!
    • Community Content - Silver 1
    • Legacy Citizen 8
    That's a very neat solution to the problem. As I understand, the waypoints would be non-collidable blocks, like area triggers or open doors.
     
    Joined
    Jun 6, 2014
    Messages
    78
    Reaction score
    10
    I like it, as for the ai ships not being able to keep pace with a mothership, why not have a range where FRIENDLY ships approaching the mother ship get caught in a (almost) gravity field around the ship (except "gravity" has no downward force defined, just free floating)
    effectively, the ships enter the field, become sub-entities of the mothership (like a player in gravity)
    and hence, now travel at the same velocity as the mothership, and even get caught for jumpdrive, with the ability to expand this field, it would be also possible to deep-strike enemy territory with fleets. of course, a ship with an enhanced field would have a insane power requirement, so power would be limited, being a priority ship to destroy, it would require vast shielding, in essence, the vessel would be forced to become a specialized vessel, it would not survive a one on one fight with similar classed or even slightly lower classed vessels.
    it would automatically force the ship to travel in groups.
     
    Joined
    Aug 25, 2015
    Messages
    55
    Reaction score
    30
    I think this is a good idea... but to be honest, at this point I'd rather have ANY kind of drone docking/IA fleet commands. Even if it isn't pretty, having any functionality is better than no functionality. [Example, putting logic to a certain block next to a rail will automatically zap the drone back to that docking point, and putting logic to it again will undock them]. Though, I realize that it would have to be coded in a way that allows the code to be refined, polished, and expanded on.