feat(framepacer): decouple logic from render fps and default to 60 fps#172
Merged
Conversation
- Enable logic time scale (m_enableLogicTimeScale = TRUE) to decouple simulation tick rate (30 Hz) from the render framerate limit. - Set default rendering FPS limit to 60 FPS in GlobalData and auto-generate/migrate SagePatch.ini to include the 60 FPS default limit. - Redesign Skirmish options menu slider to range from 30 FPS up to 120 FPS, with any higher setting capping to uncapped (--).
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.
Description
This PR solves two key issues with our previous 60 FPS modernization:
SagePatch.iniwas not updated. We now auto-migrate existing setups by appending the 60 FPS limit defaults if they are missing.--limit for values over 120 FPS).Changes
Core / Shared
FramePacer.cpp: Enabledm_enableLogicTimeScale = TRUEby default in the constructor so logic ticks at 30 Hz regardless of the render framerate.GadgetSlider.h: AddedGadgetSliderSetMinMaxto dynamically override the slider boundaries.Generals (Base) & Zero Hour (MD)
GlobalData.cpp: Set the defaultm_framesPerSecondLimit = 60andm_useFpsLimit = TRUE.GameEngine.cpp: Added an auto-migration check to read and inject 60 FPS defaults into existingSagePatch.inisetups, and updated the default template for fresh setups.SkirmishGameOptionsMenu.cpp: Set up the "Game Speed" slider to act as an FPS limit slider with bounds30to121(where values > 120 represent uncapped--).Verification
z_generals) and base Generals (g_generals) targets successfully compiled onmacos-vulkanpreset.// GeneralsX @tweak felipebraz 20/06/2026 ....