Files
Neutron/docs/checkpoint/player-phase-implementation.md
T

80 lines
5.0 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.
# C3 implementation: player phase boundaries
The first implementation chunk separates the controlled player's prior-body
physics, game input, player controller, owned fire effect and camera-input update.
It does not replace the entire scene scheduler, collision response or animation
clock. Evidence is in `input-frame-bridge.md`, `lab-registry.md`, the new
`player_phase_evidence.py`, and the follow-up `level-game-lifetime.md`.
## Source contract and implementation
EXE47E554 calls479BC0 physics before473740 game-object callbacks47E582;473770
sync follows47E587. A fresh game registers before Jimmy, and Jimmy before his
owned fire. Retained Jimmy/fire precede the newly appended destination game.
The level-game deletion predicate is restored by normal initialization; a
constructor-default zero is not the final gameplay lifetime flag. The focused
lifetime report records the complete vtable/field provenance.
`LabSimulation.Step` now integrates **existing** velocity, acceleration and queued
impulse first. Fresh input then produces speed/destination yaw, the player update
produces velocity/impulse for the next physics pass, and fire ticks afterward.
On scene continuation, the player/fire update precedes the destination input
callback. `InputAfterPlayerUpdate` records this specific retained registry relation;
it does not claim all source objects are retained by the current port.
Input uses the stored movement mode, as438B1E..438B2A does, rather than deriving
it from current physical support. Held jump selects air mode at437A96. Grounded
released-jump reset437B9E..437BAC clears jump state, mode and turn in the **player**
callback. Landing can therefore clear turn on the same frame physics finds support.
Jump queues impulse after physics and requests its pose; it does not retroactively
move the body or falsely clear its physical supported state that frame.
Source addresses above have EXE raw offsets VA−400000. The helper verifies the
hashed supplied EXE, maps PE offsets and checks9 decisive instruction sequences.
No original code was executed for these source assertions.
## Verification and remaining limits
Movement regressions assert old velocity before current input, one-time delayed
impulse consumption, fresh versus retained ordering, independent movement mode,
landing reset and unchanged fixed-step presentation independence. Input-only lab
navigation still reaches SCENE35→50→60 and the outside LOAD. This is port evidence,
not original timing/latency fidelity. Source nominal frame rate remains unproven;
the port keeps its explicit60Hz policy.
The existing capsule/gravity adapter remains. Source479DF7..479E54 can cancel
gravity on a support hit before a queued jump, giving a different first takeoff
velocity. Applying that cancellation to the provisional capsule's prior support
flag caused false support transitions in the port; it must be integrated with
the recovered pre-integration support/response in C4, not bolted onto that flag.
No source-fidelity claim is made for jump apex, stairs, wall response or visual
pivot. The underground replay checks clearance of the recovered radius60 body,
not raw209-unit standing-mesh bounds, which are a separate provisional render
scale/pivot policy. Closed-gate collision and both directional crossings remain
required. This clarifies the physical assertion rather than inferring a collider
from the render mesh.
Other scene callbacks still run in subsystem groups. Uncontrolled player physics
and control-release body preparation need their own source trace before changing
cutscene behavior. Engine morph logic remains on the port animation clock. These
are explicit next scheduler boundaries, not claimed solved by this player chunk.
Bounded follow-up anchors for that next boundary (static reads, not implemented
here): Jimmy game vtable4A373C+410→42AFC0 calls43A750 at42AFC3.43A758 clears
speed interface608;43A76C calls2C4 with three zero arguments. That target471F40
writes interface1A4/1A8/1AC. Map this preparation to the body consumer before
changing uncontrolled physics or resumption. Slot438→42AE00 additionally calls
complete178→427FF0 and sets interface1D65/global4F8182. These callbacks belong
to CAM/MCA ownership transfer, rather than interpreting null control as a whole
world pause. Lateral input complete870 is written by walking input43915D/4391B1/
439226; its cross-mode lifetime is another scalar coupling to verify when filling
out the phase state model. The present chunk does not claim all controller fields.
Final verification: full scripts/test.sh passes, log
`artifacts/implementation/integration-final.log`;20 movement groups and the new
11 camera groups, existing support/interaction/route suites, all GPU replays with
zero enabled-validation errors, SDL dummy tests and539 original hashes unchanged.
The70 Python checks include the new mode/phase and lifecycle source anchors.
Baseline69d0187 and current240-step completed walks have essentially identical
travel/final position; within-frame producer/consumer timing is tested separately.