Files
EscapistsReintroduced/docs/prison-approach-design.md

39 lines
7.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Measured private-input approach design
Read-only review of `/tmp/erri-game-profile/logs/logs_2026-09-19_18-33-53/{console.log,input-proof.json}` and current `docs/prison-input-proof-plan.md`. Source hashes and selected numerical observations are in `/tmp/erri-prison-approach-input-measurements.json`. This audit sent no input, opened no display, changed no source, and launched no engine.
## What the first relative-look run actually measured
Native yaw here is `atan2(direction.X, direction.Z)`, in degrees. The original stationary body was `(6088.5,211.39,7158.5)`.
| Observation | Native sample / real ms | View yaw | Body yaw |
| --- | --- | --- | --- |
| Chosen baseline | 22 / 33726 | 0° | 0° |
| Last unchanged sample before response | 29 / 34526 | 0° | 0° |
| First observed outbound rotation | 30 / 34627 | 1.95624° | 0° |
| Settled outbound response | 31 / 34726 | 2.12506° | 0° |
| Last outbound view; negative input sampled | 38 / 35559 | 2.12506° | 0° |
| Returned view | 39 / 35658 | 0.19226° | 0° |
| Still stationary | 44 / 36258 | 0.19226° | 0° |
| First physical forward movement | 45 / 36392 | 0.19226° | 0.19226° |
The outbound view remained 2.12506° through sample38 and the return remained 0.19226° through44. No sampled angular overshoot or oscillation occurred. Two distinct outbound samples resolve the approach to the settled angle over99ms; the return completed between samples38 and39 (99ms sampling interval), so faster dynamics are unobserved. All look sampling gaps in the captured helper records were97–136ms, median110ms.
The two requests imply **only this trial's** observed ratios of0.08854°/pixel outward and0.08053°/pixel back. The0.19226° residual is about9.05% of outbound rotation; inverse pixel requests are not exact angular inverses. The body did not turn with the small stationary camera change; it aligned to the view when actual forward movement began. A131° turn's body/camera relationship remains untested. `CharacterTurnRight` sampling captured only the negative impulse (−0.721985 at sample38); the positive event was not captured by the approximately100ms sampler. Geometry acknowledgement should remain decisive, not a requirement that both impulses appear in a sampled action value.
Helper look duration was2.48046s. First motion was0.94016s after proof entry; second motion was0.95095s after first; proof ended0.58936s after second. These include parsing, repeated ownership guards and sampling waits, **not isolated XTest transport latency**. Per-guard timing was not recorded. The three measured release-check operations, each including a fresh ownership guard and XQueryKeymap roundtrip, took184.98ms,186.00ms and177.66ms. Do not present those as individual pure guard or XTest timings.
W requested300ms but recorded down/up separation was668.39ms. Native forward input appeared at sample45 and became zero at51. Position advanced from Z7158.5 to7161.11:2.61m. At the first forward-zero sample51 it was still moving3.398m/s at Z7160.43; it coasted another0.68m before sample55 reported zero velocity,467ms later. Consequently stopping at key-up or timing a route from requested sleep alone is unsafe.
## Smallest next phase: heading and interior approach only
Implement a separate explicit approach variant, preserving the existing fixed two-motion/six-key proof unchanged. Do **not** add F, wheel selection, gate opening, or exit movement to this phase. Native success should mean the same original canonical body has physically approached a point inside the prison, stopped, and remains in PRISON with the original intact gate. Nearness alone does not prove action reach or selected lock; report those separately if the read-only native context telemetry is included.
1. Reuse the proven tiny relative-look calibration in the same run. Pin the original gate as well as the existing mode/world/controller/body/account/camera. Read its actual native context position/radius before claiming an approach to the handle; otherwise qualify only the authored interior waypoint. Derive heading from the current native body position to the verified interior target, approximately X/Z6092/7155.5 in this authored scene. Historical distance is4.6098m and yaw130.6013°, not hardcoded runtime truth.
2. Stationary heading correction: use signed yaw error and this run's observed signed gain as a proposal only. At most16 guarded relative horizontal requests, each magnitude1–128px, total absolute pixels≤2048, heading stage≤20s. Cap proposed angular step at10° and use conservative gain (e.g.75% of error-to-pixel estimate), recomputing from native response after each request. Wait for two fresh samples at least100ms apart with yaw drift≤0.2° and neutral/zero-velocity body. Refuse response in the wrong direction, individual observed change>15°, no response within1.5s, growing error on two consecutive corrections, more than two sign reversals, stale native samples or any existing ownership loss. Never infer success from pixels. Before each larger request, apply the existing current-and-projected pointer check against the exact focused clipped rectangle;128px is only an upper cap, never permission to cross an edge. If the game does not recenter its captured pointer and a request cannot fit, refuse without warping or moving focus. Require final view-heading error≤3°.
3. Forward approach: use requested50ms W pulses, at most12 pulses, with the existing unchanged1.5s key lease and full guard before every down/up. A pulse may actually remain held longer because of the guard; record real timestamps. Refuse the route if actual down/up exceeds400ms, and stop after the paired release. Between pulses require two fresh neutral-input samples with horizontal speed≤0.05m/s spanning≥100ms, bounded to1.5s after key-up. No turning or another pulse before full stop. Measure direction and stopping distance; after the first pulse require displacement0.05–1.25m and progress toward target. Subsequent pulses require remaining safe interior distance to exceed the largest observed stopped displacement plus0.25m. Refuse no progress, motion away from target, or heading drift>5°; correct heading only while stopped.
4. End within0.75m of the interior target, with neutral input/zero speed and unchanged PRISON/original gate. Cap cumulative horizontal movement6m and remain inside the measured prison interior, at least0.75m from its boundaries and outside the gate leaf's swept space. Native collider/contact clearance is still required; the authored geometry alone never guarantees an unobstructed path. Do not use a final pulse if its measured stopping budget cannot fit.
5. Combined calibration/heading/approach bound≤35s after fresh READY, checked against the original observer45s lifetime; refuse if insufficient native time remains. No deadline renewal. Preserve every raw failure. If this bound or conservative pulses cannot complete the approach, retain the refusal and use its timing evidence to design the next iteration rather than raise limits or jump directly to held interaction.
Implementation should reuse the current exact Gamescope/Xwayland sockets, process/window/focus/pointer guards and release supervisor. Add a distinct route report containing native sample references, actual event timestamps, per-stage budget and same-run geometry. The read-only native observer needs an explicit approach mode that allows observed body translation (the existing stationary look proof itself must keep its no-movement rule); it should continue exact ownership/camera/lifecycle checks. Independent validation should recompute heading, path length, progress and full stopping from raw native samples rather than trust helper metrics. Native action-context telemetry, selected-action/progress observation and an F-only lease remain a later separately reviewed phase.