Xenon 2

Autopilot · write-up

Shell firing-lane alignment

xenondoc/AUTOPILOT_SHELL_FIRING_LANES.MD · 3 KB · updated 2026-09-17

Correction (2026-09-08)

The stalled Level 1 run held ship X=239 next to a navigation station at X=240. With SPEEDUP, one horizontal press moves nine pixels. The feedback controller preferred remaining one pixel short of the point over overshooting it, although the shot anchor at X=239 could not hit the shell.

The final shell waypoint now supplies the selected weapon's complete horizontal firing interval instead of a one-pixel goal around the navigation endpoint. For the observed animation envelope X=[240,249), the integer anchor interval is [240,248]. The existing Python and C movement controllers can therefore choose X=248 and hold it. Intermediate waypoints remain narrow, and maneuver collision validation still checks the approach and the chosen position.

Station proposals consider every installed forward, laser and cannon mount. Each mount's offset shifts its own interval; separated lanes are never combined into a rectangle that incorrectly includes the gap between guns. Shell replans do not lock themselves to a previously selected weapon, and a retained station is rejected if its selected mount has disappeared. The global fire button continues to fire all installed weapons.

The observed shell animation envelope is still only a station proposal. Actual combat collision checks use the live target geometry. This change does not add a general narrow-target movement search or a damage-progress timeout.

Validation

  • Full suite: 937 tests passed (shell-lane-full-tests-0908-unrestricted.txt). The initial sandboxed attempt hit Windows temporary-directory permission errors; the unrestricted rerun passed. git diff --check also passes.
  • Focused shell tests: 18 passed, including speed-level-two alignment, selected mount offsets, replacement of a removed mount, and a reachable auxiliary cannon lane when the main gun's lane is unavailable.
  • Live native kernel / spans navigation, normal speed, no cheats, resumed from exact-motion-live-0908-02.validation/checkpoints/L1-f7652-periodic.sav.
  • Recording: shell-lane-fix-0908-01.validation/shell-lane-fix-0908-01.x2events. The ship moves to X=248 at frame 7658. Shell #9435 changes to destroying at frame 7667 and disappears at frame 7668. The previous run remained stuck on it for more than 2,000 frames.
  • The bounded run ends at frame 8652 with all three lives. It starts with shield 35 and ends with shield 15: a later shell contact at frame 8527 costs 16, followed by a projectile hit at 8531 costing 4. Both report maneuver:no_verified_escape. Alignment is fixed, but this is not a claim of safe boss completion; inspect frames 8480-8540 for the later approach problem.
  • The equipment-removal guard and removal of the old weapon lock were added after the live recording started; they are covered by unit tests. The live run exercises the firing-interval change with the existing equipment.

No C implementation change or rebuild is needed: the corrected mission interval is already consumed by both kernels.