This repository was archived by the owner on Oct 25, 2026. It is now read-only.
Repository navigation
Run Harbor Heat, Scrap Signal and Drift Foundry on a fixed 60 Hz simulation - #174
Merged
Merged
Conversation
…lation
Each game declared no simulation rate, so the shell ran one step per frame with the frame's dt: character travel, recoil and kart distance were per-machine numbers, and replays, saves and physics proofs did not line up.
Declare simulation { hz: 60 } in all three configs and prove it in the games: one scripted run at 30 and 144 fps, sampled per simulation step, compares walked distance (Harbor, Scrap), jump apex (Harbor, Scrap) and kart distance (Drift).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Harbor Heat, Scrap Signal and Drift Foundry declared no simulation rate, so the shell ran one step per frame with that frame's dt. Character travel, recoil and kart distance were per-machine numbers; replays, saves and physics proofs only lined up on the same monitor.
simulation: { hz: 60 }in all three game configs. Every game tick now gets one 1/60 step; renderers interpolate between steps.<game>/src/game/frameRate.test.ts): the same scripted run at 30 and 144 fps, sampled per simulation step, comparing walked distance, jump apex (Harbor, Scrap) and kart distance (Drift).Engine seam
Engine seam: none - the fixed step already exists in
@jgengine/core0.36.0 (simulation.hz,ctx.sim); these games had not adopted it.Checks
bun run test- 1001 pass, 0 fail (published engine 0.36.0, the catalog CI installs)bun run check-types- all 9 workspaces 0bun run check:framework --base origin/beta- 3 new game files, none engine-shapedbun run check:seam-line/check:module-globals/check:capabilities --summary- OK, debt 18 (budget 18)Numbers
Distance over the same 120 simulation steps (2 s of game time), same input at both rates:
Jump apex (same tap):
Before, with
hzleft variable: Harbor apex 0.856 m at 30 fps vs 0.952 m at 144 fps (delta 0.097 m); Scrap 1.040 vs 1.147 m (delta 0.107 m); all three travel tests fail. Settinghz: "variable"again reproduces it.Engine: merged physics PR Noisemaker111/jgengine#2315, tested pinned at
3f6cea4a(enginebeta) and on published0.36.0; both give delta 0.000 m, the apex alone moves (0.917 -> 0.978 m Harbor, 1.107 -> 1.176 m Scrap, +6.2-6.7%) once the release is adopted. If that reads floaty in play, the knob isjumpVelocity(7.4 -> 7.17, 8.4 -> 8.15); left alone here because the games ship on 0.36.0 today, where the apex has not moved.