Skip to content

Frame-rate parity tests for every character and move, and optional 30 Hz logic with smoothing (#55) - #81

Merged
schindlershadow merged 36 commits into
mainfrom
fps-parity-tests
Nov 16, 2026
Merged

schindlershadow merged 36 commits into
mainfrom
fps-parity-tests

Conversation

@schindlershadow

@schindlershadow schindlershadow commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Frame-rate parity work for issue #55: automatic tests that every move of every playable character plays at every offered frame rate (60-240) as it does at 30 fps, and "30 Hz logic" (now on by default) that makes that exact.

Tests

  • tools/fps_parity.py (+ tests/run_fps_parity_test.sh): boots straight into a battle (--direct), swaps in any of the 31 characters through the menu block (PSPRECOMP_TEST_CHAR_SWAP), runs every action (plain + mashed) and the common movement trials, samples both fighters every update and judges each rate against 30 fps (and a second 30 fps run for noise). Optional Jecht combo-window test (--jecht-combos, combo_timing.py). Headless GPU rendering (BT_GPU=1, NVIDIA EGL, no X server). Docs: docs/testing.md "Frame-rate parity tests".
  • Native high frame rates fail 75-81 % of trials (lower jumps, missed / extra hits, shifted timing): a keyed event at 30 fps acts for a whole 33 ms frame, which smaller steps cannot reproduce.

30 Hz logic (on by default; off: Debug > Developer options > Timing > LOGIC30, or PSPRECOMP_LOGIC30=0)

  • The fight runs at 30 updates a second (paced by the real clock in play, by frame count in tests); the frames between are drawn with every 3D draw's matrices (and texture scroll) blended between the last two updates. Drawn-only frames run the battle list with the pause filter minus 11 gameplay tasks; HUD logic and the camera run on gameplay frames only; the lock-on ring is moved with the blended fighter it is on.
  • Whole roster with it: 3-4 % of trials fail per rate (below the 15 % that differ between two 30 fps runs); Jecht's combo windows match at every rate. Checked on the RP6 (user: smooth, game keeps its speed when frames drop) and the desktop (frame dumps: frame-to-frame motion as even as native 60).
  • Docs: docs/frame-rate.md "30 Hz logic".

Native high frame rates

  • Exact steps above 60 fps (a cycle of 1/256-tick steps that sums to exactly 2 per 30 Hz frame): multi-hit moves landed one update late at 90 / 150 / 180 / 210 fps.

Release notes

  • Above 30 fps, fights now play exactly like at 30 fps (jump heights, hits, combo timing) with smooth motion in between, and keep their speed when the frame rate dips. Can be turned off in Developer options > Timing > 30 Hz logic.
  • Multi-hit attacks land on time at 90, 150, 180 and 210 fps.

🤖 Generated with Claude Code

schindlershadow and others added 30 commits November 15, 2026 12:08
…amples on the 30 Hz lattice, hit log, fps_parity.py; headless GPU (BT_GPU)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…far), headless GPU rendering

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed on the dummy, tolerate hit freezes, abort a run when the battle restarts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en runs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thin a 30 Hz frame (phase reported, not judged), peak height check, --moves-only

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngs updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… with 4 decimals, PSPRECOMP_MT_SNAP experiment; docs: late hits at 90/150/180/210 fps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…era off (wall clock), 0.6 s after home before a trial starts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… with the character swap, GPU, camera off, settle, PASS/FAIL verdict (fps_parity.py --jecht-combos)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s whose outcome differs): same windows with 40-50% of the trials on the saved 11 Nov results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…20 fps)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…HP finisher sweep KO'd it), trials start with home

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d not be played is reported as a harness problem

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ows 41 ms late at 90 / 150 fps)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aught mid-dash dashed for a whole run with the brain stopped); a run where over a quarter of the idle waits time out is retried

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te (a held dash no longer persists); fix the env dict (FREEZE_CPU=0 had ended up in a comment)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…10_1P is type 16); fps_parity fails a run at once when the character under test is not in the fight

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ycle of 1/256-tick multiples that sum to exactly 2.0 per 30 Hz frame (PSPRECOMP_EXACT_STEP=0 to turn off); fps_parity --fighter-log

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…un the battle task list with the pause filter (mask/value 4), step 2/0 written for the frame after next, pad held between gameplay frames; task diagnostics (PSPRECOMP_TASK_DUMP / _RUNLOG / _TRACE, PSPRECOMP_L30_SKIP)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p_hook; slow-motion clock only before gameplay frames), harness actions start with the gameplay step, from battle start, drawn-only frames run the pause filter minus 11 tasks that change gameplay; diagnostics L30_KEEP / L30_PRIMLOG

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nder it, developer options

- Renderer: each GE list carries the frame tag (gameplay generation, phase) set by the game module; on gameplay
  frames the world/view/projection/bone matrices, texture-gen matrix and texture scale/offset of every 3D draw are
  recorded (keyed by draw identity + occurrence, with a looser key without addresses for double-buffered vertices);
  drawn-only frames blend the last two gameplay frames by phase (PSPRECOMP_INTERP=1, default) or extrapolate (2).
  2D draws, jumps over 3 m and camera cuts are not blended. Consecutive-frame differences are now even (no step at
  gameplay frames).
- FX60 effect-component compensation is off while 30 Hz logic runs (the components already step at 30 Hz with
  step 2); it lengthened hitboxes at 60/120 fps (extra hits in Squall's air moves).
- fps_parity compare: the action start is logged in whole ms, which dropped the first sample when rounded up
  (410866.67 -> 410867) and showed as a one-frame lead / lower peak; samples and hits within 1 ms count.
- Developer options rows LOGIC30 (opt-in) and INTERP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… parity results, comparator start-rounding fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t home's status snapshot could hold 0: steady HP damage offset over a whole run, 221 of 503 remaining failures); 30 Hz logic puts the game's random sequences back after drawn-only frames (measured: not drawn from; a guard)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rness bug, run trials), things ruled out (RNG, camera on drawn-only frames), harness tips

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…droid API 29 and Windows builds failed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, each frame blended by the time passed (frame counting jittered on the RP6 at 120 fps when frames were dropped); tests keep frame counting; interp tag carries seq + record flag; diagnostics L30_TIMING, L30_PACE_LOG, vertex-vs-matrix motion counts in INTERP_LOG

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schindlershadow and others added 6 commits November 16, 2026 16:36
…ative phase for early gameplay frames, UI step scaled by 30/rate under 30 Hz logic, key-cache invalidated by blended matrices; diagnostics (IPTRACE, L30 call counts)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xes the stage/camera stepping at 60/90/120 fps)

The render queue captures the frame-interpolation tag when the game enqueues a list.
Dissidia builds a frame's display list during the frame and submits it right after the
frame-end hook, which had already published the coming frame's tag: every list carried
the following frame's gen/phase/record. The gameplay frame's new matrices arrived in a
list marked drawn-only and were blended against a table one gameplay frame too old, while
the list marked "record" re-emitted the previous scene, so the camera and stage moved
+1.1 then -0.1 steps at 60 fps (frame dumps: neighbouring-frame differences
1.0 / 6.6 / 1.3 / 6.9, ratio 3.85 vs 1.05 native). Skinned characters hid it less since
the same error moves their bones.

frame_end_hook now publishes the tag computed at the previous frame end (the frame that
just ran, whose list is about to be submitted) and keeps the coming frame's tag until that
frame ends. Pacing, steps and phases are unchanged.

Measured on the desktop (GL frame dumps, 60 fps walk, PSPRECOMP_L30_PACE=clock):
neighbouring-frame difference ratio 3.85 -> 1.06 (native 60: 1.05). Vulkan: all 3D
draws blended, blended camera advances in even half-steps.

Diagnostics (env-gated): PSPRECOMP_INTERP_TRACE=2 logs each list's tag as enqueued
([IPQ]) and processed ([IPL]), the frame end's tags ([IPF]) and, per frame, one stage
draw's live / previous / blended view ([IPSTAGE]).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fighter they are on (screen offset of the nearest skinned draw's root, blended vs newest); HUD steps exact (step_for) under 30 Hz logic

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y, as on the PSP; run every frame, HUD sequences that count updates ran 2-4x as often (VS banner could stay on screen, AP Chance / HP bars misbehaved now and then). The HUD is still drawn every frame (checked: no flicker in frame dumps). PSPRECOMP_L30_UI=every for the old scaled behaviour

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	psprecomp/games/dissidia/docs/testing.md
…s row turns it off); Windows build: rename an interpolation counter named 'far' (a macro there)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schindlershadow
schindlershadow merged commit 815ba23 into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant