-
Notifications
You must be signed in to change notification settings - Fork 89
feat(savegames): Use frame rate from skirmish settings as max frame rate after loading a save game #1416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Game Speed "--" appears to use a frame rate value of 61. Maybe there should be a check that turns that into 1000. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we should do that. I think the frame rate stuff needs a good look overall.
I think the first course of action is decoupling Render frame rate from engine update rate, unless there are issues. I started looking into that and have a rough plan how to do that and started implementing some things for it.
And then make the Render frame rate and Engine update rate customizable everywhere (except Engine update rate in Multiplayer).
@@ -675,6 +676,10 @@ SaveCode GameState::loadGame( AvailableGameInfo gameInfo ) | |||
// clear out the game engine | |||
TheGameEngine->reset(); | |||
|
|||
// TheSuperHackers @tweak Caball009 03/08/2025 Use the fps preference from the skirmish settings as fps limit after game engine reset. | |||
if (gameInfo.saveGameInfo.saveFileType != SAVE_FILE_TYPE_MISSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this condition necessary?
@@ -675,6 +676,10 @@ SaveCode GameState::loadGame( AvailableGameInfo gameInfo ) | |||
// clear out the game engine | |||
TheGameEngine->reset(); | |||
|
|||
// TheSuperHackers @tweak Caball009 03/08/2025 Use the fps preference from the skirmish settings as fps limit after game engine reset. | |||
if (gameInfo.saveGameInfo.saveFileType != SAVE_FILE_TYPE_MISSION) | |||
TheGameEngine->setFramesPerSecondLimit(SkirmishPreferences().getInt("FPS", TheGlobalData->m_framesPerSecondLimit)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean the SkirmishPreferences will be applied when loading a Campaign Mission savegame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but only to manual save games, not automatic save games ("Mission Start").
That sounds reasonable. We could hold off on this PR if the above is implemented in the not-too-distant future. |
Loaded skirmish (and mission) save games play at the default frame rate. This ignores whatever frame rate they were started with, and it ignores the current frame rate (the value of Game Speed) in the skirmish menu. This PR uses the latter value as max frame rate when loading save games.
TODO: