On carriers and the upcoming AI crew additions

    How do you like it?

    • Eh, it's good.

      Votes: 0 0.0%
    • I don't care. (Why are you here?)

      Votes: 0 0.0%
    • Awful.

      Votes: 0 0.0%
    • Leave and never come back.

      Votes: 0 0.0%

    • Total voters
      2
    Joined
    Aug 10, 2015
    Messages
    99
    Reaction score
    45
    • Community Content - Bronze 1
    Throughout Sci-Fi across the years we can see many examples of different types of hangar bays used in carriers and other ships.

    We see examples like:


    We also have the upcoming AI Crew update that will allow us to use AI crew to man and enhance our systems.

    "What is the problem?" You might be asking.

    Well, imagine an AI-manned drone or fighter trying to enter or exit any of these three hangar bays.
    Further, imagine just five all trying to exit or enter at the same time.
    They'll pile up, bump walls, crash into the floor, and generally cause a ton of collisions, lag, and add chaos into what should be a fairly standard maneuver.

    There are several solutions to this issue that I've come up, with varying degrees of viability/ease of use, and I'm eager to hear your solutions as well, because this is a major obstacle to the feasibility of AI fighters in Starmade, beyond simple drone racks that just fling drones out.

    My first solution is quite dumb, not viable, and generally would be annoying to do. That solution is to just improve the AI. There's a bunch of reasons why this wouldn't really work. One of the main ones being the amount of development time that would need to go into making the AI good enough to handle this. There'd also still be many collisions and other issues that would arise from this.

    My second solution is more easy on the devs, but is pretty much just a band-aid for the problem. This one is to make it so undocking/docking AI ships can't collide with the carrier ship while performing undocking/redocking procedures. This would be much easier for the devs to program, but would look very strange, feel unnatural, and could cause exploits.

    My third, and final, solution which I like the most is what I believe to be a fair balance between dev-time and effectiveness. As part of the AI crew update we're supposed to be able to designate walking paths to our AI crew, and even potentially teach them how to use logic activated doors and other structures. The devs could build on this system, and allow us to use a similar method to mark the paths of ships entering and exiting hangar bays.
    With that Wraith Dart-Bay above, for example, it could be made that the first Dart launches into the center space, reorients, and then exits the ship, and then the next, and the next, and the next. Flipped around of course for redocking. This would make it so that the different ships will never collide with each other while moving out of, or into, the ship. Another way to help this, and to avoid collisions with the carrier-ship, would be to make it so that the AI ships behave similarly to players when still in the docking procedure, and "attach" to the mothership so that they move with it and don't ram into walls when the mothership accelerates.

    Issues with my third idea could be possible lag generated by the AI figuring out pathing, and the relative complexity of mapping out the AI's path out of and into the ship.



    So, what do y'all think? Reply with your own ideas and solutions, and lets have some discussion about these potential issues.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    We could have walk-trough rails defining the paths for fighters (even wedges, as there are no clipping issues.

    When docking/undocking, register a path to the bay and other ships check whether this path is occupied or not (optimisation: check most commonly used part of the "roads" first)​

    Another good approach is to improve the AI. Actually takes less efforts than you think if done right.

    You need convex 3D-volume, where the outline has no angle >180° on the inside.
    If you have a shape with concave angles, sections separated by a line between 2 of them are their own 3D-volume.

    In a block based game, you may need to redefine what convex/concave means (blurry interpretation).
    A ship can now move from one 3D-volume to adjacent if it fits through the passage.

    You don't need a way-point, just the shortest path from position to the next passage.
    Optimally the shortest path that doesn't collide with anything else.​
     
    Last edited:
    Joined
    Jan 29, 2015
    Messages
    142
    Reaction score
    58
    Ok, here is how I imagine AI Carriers could work:
    • Have a Rail extend to the hangar door
    • On the AI ship, have a docker that is linked to the last block of the rail in the hangar door (like you link wireless logic blocks for example), so it knows which rail to approach
    • Now, when you tell the AI ship to dock to the carrier, the ship will first position itself infront of the hangar door (50m? 100m?) so that the docker aligns with the rail
    • Then the AI ship slowly accelerates forward and docks with the rail
    • If the carrier handles multiples ships, the player has to build a rail system to manage them to put them into their respective bays
    • For undocking, just do the whole process in reverse
    Hope that is understandable...
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    screen.png

    Imagine this is your hangar, the small square at left is your exit, the small square mid/right is limiting the space inside an otherwise convex volume.

    Because the right little square is concave, the volume is cut with an enlarged version of 1 face adjacent to the concave vertices/lines.
    Which face will cut the volume? The right or left highlighted one?

    If you have all-rectangles (with blocks) You only have 3 combinations of axis in which to cut and it might be easier to figure out.​