mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 11:49:59 -04:00
Round the physics solver's step count up above 60 fps and give Ocarina a steady step.
Above 60 fps players fell off moving platforms. The physics system takes its solver step count for a frame as trunc(frames per update * 4 + 0.001): 4 at 60 fps and 8 at 30, the rates the game ships with, but 3 from 61 to 80 fps, 2 to 120, 1 to 240 (144 solver steps a second at 144 fps against 240 at 60), and 0 in a frame shorter than a quarter of a 60 Hz frame. The solver skips its whole solve and sub-integration loop at 0, so such a frame resolves no contact or friction and moves no rigid body. At a 240 fps limit, which "unlimited" paces at too, that was the frame after every late one: the pacer keeps its phase, so the next display interval is shorter than the period. The new patch set osolver rounds the count up, ceil(frames per update * 4 - 0.25): 4 and 8 as before, never fewer steps a second than at 60 fps, at least 1. physics_steps = 0 gives the game's own count. The step itself was the mean of the last five display intervals and changed with every frame: intervals of 5 and 30 ms in turn gave steps of 15 and 20 ms in turn, and one 60 ms frame at 200 fps took the step from 5 to 16 ms for five frames. The game never saw a changing step on the console. The step is now the mean of the last 12 intervals without the longest and the shortest, is the pacer's period when within 3% of it (at a 60 fps limit exactly one frame, every frame), and repays the time the game was not given at up to a tenth of the step, so game time still follows the clock. It is at least 1/480 s. step_steady = 0 gives the mean of five again. With trace = perf the fps lines show the shortest and longest step and the time owed. tests/frame_step_check.py drives frame_rate.c with made-up display times and the rest of the runtime stubbed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -244,6 +244,11 @@ launcher imports a zip it wrote. The second builds `fs_host.c` and `save_share.c
|
||||
and runs each step as a start of the game on a profile it makes: the export, an import from a zip the launcher
|
||||
exported, its backup and swap at the next start, the zips it refuses and Cancel. No game files.
|
||||
|
||||
A change to the step Ocarina is given each frame (`runtime/frame_rate.c` `ocarina_step`) passes
|
||||
`python tests\frame_step_check.py`, which builds `frame_rate.c` with the rest of the runtime stubbed and feeds it
|
||||
display times: a held 60 fps limit gives exactly one frame every frame, a 240 fps limit never less than a quarter
|
||||
frame, uneven frame times one steady step, and game time follows the clock. No game files.
|
||||
|
||||
A change to the button prompts (`tools/make_romfs_patches.py --prompts`, `tools/button_icons.py`) passes
|
||||
`.venv-py314\Scripts\python tests\romfs_prompts_test.py`, which runs the tool on a RomFS it makes itself (no game
|
||||
files); a change to the settings passes `nx2navi.exe --probe-cfg`.
|
||||
|
||||
Reference in New Issue
Block a user