Skip to content

A drive step can aim: moveMouse, look and aimAt move the real crosshair - #2320

Merged
Noisemaker111 merged 2 commits into
betafrom
agent/lane-aim-step
Oct 24, 2026
Merged

Noisemaker111 merged 2 commits into
betafrom
agent/lane-aim-step

Conversation

@Noisemaker111

@Noisemaker111 Noisemaker111 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

A shooter proof could fire but not aim: the step vocabulary had click, key, clickAt, fill, wait, waitFor, shot, probe, rpc, reload and assert, and none of them turn the camera. Scrap Signal's front fight showed it — six taps spent ammo and the Foreman's health never moved.

  • captureArgs.ts: moveMouse: [x, y], look: [dx, dy] and aimAt: "<page expression>" (with tolerancePx, default 6) parse into the existing step list, list in --check, and carry before/after like any step. --check and --help name them; a bad coordinate names its index.
  • driveAim.ts (shared with the bundled drive.mjs through gameFiles.ts): look takes pointer lock on the play canvas inside a CDP user gesture, so it never clicks and never fires; it measures the movementX/movementY the page actually received, falls back to a page-delivered move when the browser sends none, and refuses a turn that produced nothing. aimAt reads the target's projected {x, y}, measures the page's own pixel response, and corrects until the crosshair is on it.
  • Both executors run the three steps (a new kind can no longer fall through to the shot branch).

Scrap Signal, --state boss, step file front-aim.json:

frontBossHealth 217/420
#2 key mouse0 400ms                       (spawn crosshair)
#3 assert frontBossHealth is 217          -> 217   the shot left no damage: crosshair off the Foreman
#4 look 300,0 px                          -> moved 100,0px
#5 key mouse0 400ms after health < 217    -> after 2135ms
{"probe":"after"} frontBossHealth 208/420          the same hold now damages it

The starter pistol works once the crosshair is on the body; the earlier "no damage" was aim, not the gun.

Verification: bun run verify:fast (typecheck + 8 test files + 8 gates, pass), bun run check-skills (pass), bun run drive scrap-signal --state boss --steps .scratch/front-aim.json (6/6 steps, 217 -> 208).

Remaining: Scrap exposes no projected screen point, so its proof uses look; aimAt is covered by a fake-page test at two different pixel costs. The step file lives in .scratch/ — it belongs in JGengine-games as scrap-signal/proofs/flows/front-fight.json.

Proved on Scrap Signal: firing at the spawn crosshair leaves the staged Foreman at 217/420, a 300px look puts the crosshair on it, and the same hold drops it to 208.
@Noisemaker111
Noisemaker111 merged commit a960cc6 into beta Oct 24, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant