v0.2.3 — Repeatable fights and a sound-library guard
Mostly test tooling again, with one change that affects play: a guard against a
rare crash in the game's sound code.
Fixed
- A rare crash in the sound library. Found by v0.2.2's longer test run: in one
of three Debug runs of a four-fighter match the game's audio interrupt routine
followed an empty entry while tidying up an idle voice. The routine now checks
for it. The underlying timing fault is in the emulated audio chip and is still
there; the guard keeps the game running when it happens and logs it. The guard
has not been seen to fire since, so it is not yet proven against the real event.
New
- Fights that play the same way twice. A scripted fight can now be driven by
the game's own simulation step instead of the host's clock, with the random
seeds of the match and of the CPU fighters pinned. Three replays reproduced a
recorded thirty seconds of game state exactly: every sampled position, health
value and button, and every hit. - A regression check on how the fight plays. The recorded state has the same
hash on the Release and Debug builds, so it is kept as a golden reference. The
full regression replays the pinned fight and fails if the first thirty seconds
of simulation changed, even when the picture still looks right.
--stream-outand--stream-expectdo the same for any run. - A live negative control for the combat check: a run whose input never
presses anything fails the movement, attack and damage assertions.
See Gameplay test harness.
What was learned
- Two runs of the same script used to differ within half a second because each
CPU fighter seeds its own random generator from the processor's time-stamp
counter at every match start. The match's main generator was not involved. - The game advances a fight exactly sixty steps a second and reads the pad once
per fighter per step, from a table that can be driven directly.
Details: docs/research/fight-determinism.md, combat-telemetry.md,
dsound-voice-list-crash.md.
Build this version
git clone --recursive --branch v0.2.3 https://github.com/vyanhursky/DefJamFFNY-recomp.git
cd DefJamFFNY-recompUpdating from v0.2.2: rerun the lift and the build (.\scripts\recomp.ps1, then
.\scripts\build.ps1 -Preset win-x64-release). The analysis step does not need
rerunning. This is a source release: no game data, generated code, captures
or executable.
Validation
On one machine (Windows 11, 2560x1440 at 120 Hz):
- Release: the thirteen-check regression passed with every change in place,
including the replay check against the golden hash; the opt-in repeat check
passed (80 records identical over 1,800 steps). - Debug: fight, four-fighter Terrordome, combat (27 of 27) and repeat passed.
The full Debug regression was not rerun. - The recorded stream had the same hash on Release and Debug and on two save
fixtures. - Unit tests: 165 pass with the compiler available.
- The sound-library guard did not fire in any of these runs.
Limits
- Repeatability is established for thirty seconds of a One on One. Longer
stretches usually repeat as well, but one pair of fights parted after 52
seconds for a reason not yet found. - Menus are still driven on the host's clock.
- The step-timed input and seed options write to the game's memory. They are test
controls and are off unless asked for. - Everything listed as open for v0.2.2 except the above is still open.