Mech phase 4 complete + phase-5 frontier documented

Records that the Mech constructor works live (segment walk instantiates the full
roster, mech links as viewpoint, mapper installs) and the precise phase-5
frontier: Simulation::GetAttributePointer via PerformAndWatch, because the
reconstructed subsystems reuse the base AttributeIndex and publish none of their
real attributes. Phase-5 plan (per-subsystem AttributeIndex -> watcher/chain/plug
wiring -> mech2/3/4 per-frame sim -> rendering) in MECH.NOTES.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-20 08:44:53 -05:00
co-authored by Claude Fable 5
parent ac4142e7c7
commit 961d27233c
+31
View File
@@ -66,3 +66,34 @@ remaining game.
Until then the ctor Fails cleanly at the frontier; everything below it (engine,
app, network, mission, player, factory, jointed-mover base) runs real
reconstructed code.
## PHASE 4 DONE + PHASE 5 FRONTIER (2026-07-20)
**The Mech constructor WORKS.** Live boot: `new Mech` -> segment walk instantiates
the full subsystem roster into the base Entity subsystemArray (dispatch on the
real VDATA classIDs; unknown IDs -> base MechSubsystem so no NULL slots) ->
caches sensor/gyro/sinkSource/hud -> mech links as viewpoint -> SetMappingSubsystem
installs the MechControlsMapper in slot 0 -> mission startup. All structural.
**Phase-5 frontier (the behavioral integration):** boot now crashes (real NULL
deref, not a staged Fail) in `Simulation::GetAttributePointer` reached via
`Simulation::PerformAndWatch` (the per-frame execute + watcher update). Root:
the reconstructed subsystems reuse the base `Subsystem::AttributeIndex`, so they
publish NONE of their real attributes (Sensor RadarPercent/SelfTest/BadVoltage,
Generator OutputVoltage, Emitter ChargeLevel, HUD/Torso/Gyro readouts, ...). The
watcher/gauge binding + per-frame PerformAndWatch resolve those attribute IDs and
hit a bad/NULL activeAttributeIndex path.
Phase-5 work, in order:
1. Per-subsystem AttributeIndex: define each subsystem's AttributePointers[]
(ATTRIBUTE_ENTRY(class, Name, member)) + a real AttributeIndex chained to the
parent, and pass it to that subsystem's DefaultData (instead of the base).
The surviving CODE headers (SENSOR.HPP, PPC.HPP, GAUSS.HPP) list the attribute
enums; the decomp AttributePointers[] tables give the rest.
2. Watcher / capability-chain / plug wiring in the Mech ctor (controllable/
heatable/weaponRoster/damageable) so PerformAndWatch has valid targets.
3. The per-frame simulation itself: mech2 (animation SM), mech3, mech4
(locomotion/targeting) -- ~9K lines, currently all staged Fail.
4. Rendering integration (the DPL renderer bridge) + playable verification.
Everything through the Mech ctor + viewpoint link runs real reconstructed code.