Skip to content

Renderer: frame pacing — frame-rate limiter, update/render decoupling, frame-time smoothing #456

Description

@drsnuggles8

Problem

The window layer exposes only a vsync toggle (Platform/Windows/WindowsWindow.cpp glfwSwapInterval). There is no frame-rate cap, no frame-time smoothing, and update+render are fully coupled (one update per present) in Core/Application.cpp.

Why it matters (performance / feel)

  • No way to cap to 60/120/144 for power/thermals or consistent pacing.
  • Coupled update/render makes frame-time spikes jerk the simulation (largely mitigated once sim is on a fixed tick — see the determinism issue).

Proposed approach

  • Configurable frame-rate limiter (sleep + short spin to hit target frame time).
  • Decouple update (fixed tick) from render (display rate) with interpolation — pairs with the fixed-timestep work.
  • Optional frame-time smoothing / EMA for the delta handed to interpolation.

Acceptance criteria

  • Selectable frame cap (off / 60 / 120 / 144 / custom) that holds steady.
  • Render rate decoupled from sim tick; smooth motion at non-multiple refresh rates.

Tier C — performance / feel.

Score

capability: 3
craft: 3
stability: 2
decay: 1
effort: 3
confidence: 0.8
learning: 3
fun: 3
kano: performance
blocked_by: []
blocks: []

Rated per issue-scoring · score = confidence × (capability + craft + stability + decay) / effort, derived by the picker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestperformancePerformance / data-oriented optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions