Files
Neutron/docs/gameplay/main-menu-player-lifetime.md
T

111 lines
8.1 KiB
Markdown
Raw 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.
# First story entry inherits the menu's Jimmy registry position
2026-11-06. This closes the missing source lifetime distinction behind the Carl
neutral-return failure. It does not establish a universal rotation reset or a
native Windows/full-original cutscene capture.
## Source and supplied data
Canonical Neutron.exe SHA256
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`;
retained REA instruction Evidence
`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`.
`tools/binary/main_menu_player_lifetime.py` verifies8 calls,15 sites,15 bindings,
12 instruction spans and both actual GAMs. Coordinates below are preferred VAs;
the helper PE-maps file offsets independently (these text offsets equal VA−400000).
| Boundary | Source fact |
|---|---|
|46A641→46B160;46A660→46A310→44D0E0|Construct application and MAIN. This bounded prefix alone does not create Jimmy.|
|46BA12/46BA18|Application constructor seeds elapsed+804=0 and splash stage+808=0.|
|46BEC0..46C067|Application update increments elapsed. Strict elapsed>3s or an accepted Escape edge advances stages0→1→2→3; the3s float is48E5A0.|
|46BF2F..46C00A|Stage1 advances to2, clears elapsed and dispatches app114(`level1d.gam`) at46C004. This is the previously omitted positive background-load edge.|
|app114→46DFB0;46BEDF;app104→46DFF0|Queues filename+74D with signed callback countdown+7FA=2; underflow sets pending+74C; the application then invokes ordinary selective teardown/load.|
|Level1D GAM|LV1D,54 records, first3JIM/JIM1 at raw8. SHA256276133d750eaa82724b35c12a91fce41a9e074224e3ef12c3624564ae8ed4d9e. Loading the supplied background creates Jimmy before a user story load.|
|46E570..46E67D|After GAM records, each surviving registry node receives Init28 then PostLoad40C before advancing to the next node, including retained MAIN; Init is not limited to newly parsed records.|
|MAIN/Level1D game28→44D4E0→4587F0→470540|Common Init restores stored+11 into live+139 through4705B3/4705BC. Both games' stored value is1. MAIN's constructor-default live0 therefore does not imply indefinite retention after background initialization. Their40C is44DF30, a noop call plus own game520=0 store, with no later lifetime reset.|
|404B4F→460E70→460EA0/460EF0→4603F0|The NewGame action queues NewGame.tsk; the reader consumes that request. The request itself does not initialize Jimmy.|
|460A50..460A6A;460BD1|The reader requests a destination GAM only through an existing non-null controlled receiver accepting **C3DJIMMY** at4ECB20. It dispatches Jimmy complete168→43B5A0 with the staged filename/start/root data. The no-Jimmy path does not supply that request.|
|43B5A0→app100/46DF70|Uses the ordinary player scene-transition request. The successful TSK-to-GAM path does not construct a new player before teardown.|
|Jimmy4226B5..BF;42275A|Stored/live teardown predicate0 via470F40(0), reusable game09=1. The initialized old games qualify for removal; Jimmy survives.|
|46E38B/46E45A→46E6A0,46E6E0|Matching reusable3JIM is found in the existing registry. Reuse does not invoke its constructor or re-append its node. The new game header is allocated/appended after that existing node.|
Lab Level1B has129 records and first3JIM/JIM1 at raw8, SHA256
316fff40db565c2add5b07cbccdef640ddb67c64d6625fea1429ce2a0542a234.
The prior [game-lifetime proof](../checkpoint/level-game-lifetime.md) supplies
the initialized-game predicate, destructor unlink and retained-character order.
The earlier fresh game→Jimmy proof remains correct **when no reusable Jimmy
exists**. It was incorrectly applied to the port's first TSK-backed story scene.
## Causal consequence and implementation boundary
A successful original TSK character/destination load requires an existing Jimmy;
the ordinary loader retains him and appends the new game afterward. Thus the
normal New Game story path has **Jimmy update before level-game input**, even
though it is the first playable lab. The background edge explains where that
player comes from; successful-request and retention guards establish the ordering
without treating a black screenshot as proof of the complete New Game sequence.
At Carl completion, grounded/released Jimmy clears mode704/turn614 in437940
before438A60 can select air input. The stale airborne destination is not republished.
This agrees with the already-executed original-component composition and the
user's upright-original observation. No Euler/turn reset is added to control grant,
DEFAULT, landing, task or animation callbacks.
The port previously selected retained input order only when `carriedSave!=null`.
Its initial story also consumes NewGame.tsk, but incorrectly used fresh order.
Correct only that scene-entry classification: TSK-backed story and retained
transitions use player-before-input; direct scene inspection/fresh simulations
keep fresh order. Remaining scalar/helper/lifetime reconstruction stays bounded.
## Runtime evidence and limits
An isolated generated-copy diagnostic observed MAIN followed by Level1D allocation
and a Jimmy registry node. It required a recorded, one-time Win32 ValidateRect
acknowledgement after a pending full-window WM_PAINT. Thread snapshots suspend/
resume owned threads briefly, so timing is perturbed. The supplied HDnoCD and
640×480 NoCD variants have separately authenticated identities; their only mutual
byte differences are the3 resolution-data bytes. Neither is silently equated with
the canonical EXE. These captures show allocation/lifetime progress, not usable
rendering, completed PostLoad, user New Game or Carl playback.
Local artifacts: `artifacts/original-startup-diagnostic/{before-ack,with-ack,long-hd}/`
and `artifacts/main-menu-player-lifetime/source.json`. The baseline port's strengthened
native Vulkan control-phase regression fails on **first neutral tick0**:
inputAfterPlayer=false, current roll360, destination roll−10.000001, mode0/turn0.
This is the exact source-composed stale writer. After the correction, the native
Vulkan fixture stays upright on first resumed input and300 neutral ticks, then
resumes held movement. It preserves heading and locked body/fire/energy updates.
The existing standing/landing/air algorithms are unchanged; airborne return is
still governed by original air input, not an invented blanket leveling rule.
Verification: all336 Python plus2 HUD checks, all managed projects and36
GPU/render passes succeed. Eight new managed trajectories coverLeft/Right,
natural/skip and repeated Carl scenes. Native Linux SDL/Vulkan1920×1080 control
replay and VR04 powered steering/keyboard/800×600 resize pass, zero Vulkan errors.
The first post-return held-input readback is inspected upright. Final Debug build
has zero warnings/errors and Windows x64 cross-publish succeeds. No native Windows
execution or full-original Carl runtime is claimed.
Both self-contained packages identify clean runtime commit ea04210f524faae7dc1caff8afbc608fbb8144f4.
Each contains519 byte-identical original copies,4285 matching prepared scene files
and7 matching prepared audio files. Their runtime DLLs match the corresponding
published outputs. Standalone Linux from /tmp without SDK/development-library
paths passes first input/300 neutral ticks and held-input return; all4 captured
readbacks match development byte-for-byte. Validation is disabled for that
standalone run; the development native run has validation enabled and zero errors.
The optional validation layer needs its development library path; its initial
ErrorLayerNotPresent diagnostic is retained as package-control.log.
The Windows package also passes the32-frame Carl/control fixture under isolated
Wine64 with no Original-directory mount or network, including the neutral-return
assertion and held-input resumption. Wine exit0 is recorded; this remains
preliminary compatibility evidence, not native Windows testing. All539 original
files remain unchanged.
Logs, baseline failure, source contracts, capture hashes, verified-change.json,
package-identity.json and package-verification.json are in
artifacts/main-menu-player-lifetime/. Wine capture metadata/logs are in
artifacts/tsk-entry-windows/. Full original/native Windows comparison remains
separate from this source-supported initialization correction.