Skip to content

Autopilot Follow-Ups: Path-Cast Detours, Flight Profiles, and Threat Response #4

Description

@rebaserHEAD

Follow-up to the autopilot spin-out on feat/autopilot-standalone. That branch takes autopilot off the NPC HTN stack entirely (it drives the steering servo directly from a flight-order component) and already ships speed-limiter obedience, a console status readout with cancel, one flight order per grid, and a helm speed policy that survives crew changes. This issue collects the improvements we agreed are worth pursuing on top of it.

Scope (each item is separable, roughly in priority order):

  • Path-cast detour avoidance (design agreed, next up). Reactive avoidance scans at most min(800, brakePath * 4) ahead, while map-screen orders span thousands of units, so a long haul flies dead straight at a POI and hard-dodges it at close range. In the autopilot system (not the servo): on engage and every few seconds, sweep a ship-width corridor to the destination against grids; if something obstructs, steer to a lateral detour point (obstruction radius + ship radius + buffer, toward the side with more clearance) until the direct line clears. Skip obstructions that contain or sit within arrival range of the destination. Moving grids are treated as static per re-check; the reactive 24-sector solver stays untouched underneath as the close-in net. Zero drone impact.
  • Flight profiles. The servo can already turn-and-burn (rotation follows the wish vector, so an unconstrained ship flips and brakes on its main drive), but autopilot pins AlwaysFaceTarget so rammers cannot hit a flank for free. Make it a pilot choice on the console: Transit (flips freely, fastest stops) vs Guarded (nose on destination, current behavior), maybe Broadside (TargetRotation = 90). Server side is just which knobs Engage sets; the real cost is the toggle UI.
  • Abort-on-fire. Autopilot currently flies straight through a firefight. If the grid takes ship-weapon damage mid-flight, disengage with a distinct alarm sound so the crew mans the helm.
  • Waypoint queue. Multi-leg routes flown in order with a ping per leg. Server side is near-trivial with the flight-order component (queue instead of single target, arrival advances the leg); the UI affordance is the real cost. The detour work above builds the internal leg-following this would reuse.
  • Flip-time budgeting in the servo brake math. The stopping-distance estimate (v^2 / 2a) measures deceleration at the current facing, so during a flip the ship starts braking conservatively early. Only matters once the Transit profile exists, and it touches the shared servo the drones ride, so it gets its own careful PR.

Parked until someone actually asks: dock-assist arrival (fly to a dock and align for docking) and FTL-integrated long hauls. Both are big and touch other systems.

Explicitly cut: projectile dodging for autopilot (AvoidProjectiles). The sector jink fights the predictable-bus-ride expectation, puts the avoidance scan hot path on every player ship, and a dodging ship with a human about to grab the helm is an input-averaging mess. Abort-on-fire covers the need honestly.

Open questions: profile names and their default (Guarded is the safe default in contested space), and whether cancel/abort feedback should get its own sound instead of reusing the arrival ping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions