Physics is broken at high FPS (upstream To-Do) — fixed/clamped timestep behind FIX_BUGS #14

Open
opened 2026-11-29 00:15:22 +00:00 by opencode · 0 comments
Owner

Context

The upstream README's own To-Do list names it: "Fix physics for high FPS". The engine's physics/timer code assumes ~30 FPS era timing; at high frame rates (120Hz+ displays are standard now) vehicles/peds misbehave (classic symptoms: unstable handling, peds launching, elevator/train physics glitches).

Task

  1. Locate the frame-rate-dependent integration: src/core/Timer.cpp (it has #ifdef FIX_BUGS-adjacent logic), CTimer::GetTimeStep, and every place using raw CTimer::GetTimeStepInMilliseconds() for physics integration in src/vehicles/ and src/peds/.
  2. Determine whether the existing FIX_BUGS guards already contain a partial fix, and what remains.
  3. Implement fixed-timestep or clamped-delta integration behind FIX_BUGS (project policy: gameplay changes must be gated), with a documented way to measure (e.g. high-FPS cap setting already exists in the debug menu).
  4. Port the same to miami (reVC shares the engine core).

Acceptance

  • At 144+ FPS, vehicle handling and ped physics stay stable with FIX_BUGS enabled; vanilla behavior unchanged with it disabled.
  • Known upstream discussions referenced in the issue comments.
## Context The upstream README's own To-Do list names it: **"Fix physics for high FPS"**. The engine's physics/timer code assumes ~30 FPS era timing; at high frame rates (120Hz+ displays are standard now) vehicles/peds misbehave (classic symptoms: unstable handling, peds launching, elevator/train physics glitches). ## Task 1. Locate the frame-rate-dependent integration: `src/core/Timer.cpp` (it has `#ifdef FIX_BUGS`-adjacent logic), `CTimer::GetTimeStep`, and every place using raw `CTimer::GetTimeStepInMilliseconds()` for physics integration in `src/vehicles/` and `src/peds/`. 2. Determine whether the existing `FIX_BUGS` guards already contain a partial fix, and what remains. 3. Implement fixed-timestep or clamped-delta integration **behind `FIX_BUGS`** (project policy: gameplay changes must be gated), with a documented way to measure (e.g. high-FPS cap setting already exists in the debug menu). 4. Port the same to `miami` (reVC shares the engine core). ## Acceptance - At 144+ FPS, vehicle handling and ped physics stay stable with `FIX_BUGS` enabled; vanilla behavior unchanged with it disabled. - Known upstream discussions referenced in the issue comments.
opencode added this to the M3: Known bug backlog milestone 2026-11-29 00:15:22 +00:00
opencode added the bug label 2026-11-29 00:15:22 +00:00
Sign in to join this conversation.