Skip to content
This repository was archived by the owner on Oct 25, 2026. It is now read-only.

Run Harbor Heat, Scrap Signal and Drift Foundry on a fixed 60 Hz simulation - #174

Merged
Noisemaker111 merged 1 commit into
betafrom
agent/lane-fixed-hz
Oct 24, 2026
Merged

Noisemaker111 merged 1 commit into
betafrom
agent/lane-fixed-hz

Conversation

@Noisemaker111

Copy link
Copy Markdown
Owner

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.
  • One frame-rate proof per game (<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).
  • No retune. Apex at 30 vs 144 fps is identical to the millimetre, so no frame-rate retune is demanded; the two games have no jump-height-gated content (jump is an input action only).

Engine seam

Engine seam: none - the fixed step already exists in @jgengine/core 0.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 0
  • bun run check:framework --base origin/beta - 3 new game files, none engine-shaped
  • bun run check:seam-line / check:module-globals / check:capabilities --summary - OK, debt 18 (budget 18)
  • played in GPU Chrome: nothing visible changes; the proof is the scripted run below, not a screenshot

Numbers

Distance over the same 120 simulation steps (2 s of game time), same input at both rates:

game 30 fps 144 fps delta
Harbor Heat walk 21.390 m 21.390 m 0.000 m
Scrap Signal walk 20.010 m 20.010 m 0.000 m
Drift Foundry kart 9.943 m 9.943 m 0.000 m

Jump apex (same tap):

game 30 fps 144 fps delta
Harbor Heat 0.978 m 0.978 m 0.000 m
Scrap Signal 1.176 m 1.176 m 0.000 m

Before, with hz left 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. Setting hz: "variable" again reproduces it.

Engine: merged physics PR Noisemaker111/jgengine#2315, tested pinned at 3f6cea4a (engine beta) and on published 0.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 is jumpVelocity (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.

…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).
@Noisemaker111
Noisemaker111 merged commit ca3479d into beta Oct 24, 2026
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant