docs(engine): explain that the render FPS cap governs input responsiveness#235
Merged
fbraz3 merged 1 commit intoJul 24, 2026
Merged
Conversation
…eness The "FPS Limit" render cap (RenderFpsPreset / GlobalData::m_framesPerSecondLimit) is easy to mistake for a game-speed control. It is not: game logic always runs at a fixed LOGICFRAMES_PER_SECOND (30 Hz). But because the main loop services input (SDL poll + GameClient::UPDATE message processing) once per render frame and then FramePacer::update() sleeps to hold the cap, the cap also sets the input sampling rate. A low cap (e.g. 30) makes the mouse feel laggy and moving units hard to click, while the simulation speed is unchanged. Adds documentation-only comments at the two authoritative sites (the FPS preset table in FrameRateLimit.cpp and the pacing wait in GameEngine::execute) so future readers do not re-diagnose this as an input/display-latency bug. Relates to fbraz3#231 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fbraz3
approved these changes
Jul 24, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Documentation-only. Adds comments at two authoritative sites explaining that the render FPS Limit cap is not a game-speed control: game logic always runs at a fixed 30 Hz (
LOGICFRAMES_PER_SECOND), but because the main loop services input once per render frame andFramePacer::update()sleeps to hold the cap, the cap also sets the input sampling rate. A low cap (e.g. 30) makes the mouse feel laggy and moving units hard to click, while the simulation speed is unchanged.Sites commented: the FPS preset table in
FrameRateLimit.cppand the pacing wait inGameEngine::execute().Rationale
This surprised a macOS user (#231) who had lowered "Game Speed" to 30 as a workaround for an unrelated older bug, then experienced it as a "mouse input is delayed" problem — leading to a long investigation. A Metal System Trace confirmed display latency was ~12 ms (not the cause); the real cause was input-per-frame throttled by the 30 FPS cap. These comments should prevent re-diagnosis.
No behavior change. 19 lines, comments only.
Relates to #231
AI assistance disclosure
Per CONTRIBUTING: the comment wording was drafted with AI assistance (Claude) and reviewed/verified by me against the code paths described. No functional code was generated or changed.