Skip to content
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

Add frameskip setting by percent of current FPS #11523

Merged
merged 3 commits into from
Nov 4, 2018
Merged

Add frameskip setting by percent of current FPS #11523

merged 3 commits into from
Nov 4, 2018

Conversation

mrfixit2001
Copy link
Contributor

This PR adds a frameskip type setting that allows the user to select how the frameskip number is used. The default being skip the specified number of frames, but it adds the option to skip a calculated percentage of FPS. The number of frames to skip is then dynamically calculated off the current FPS and adjusted as the game's FPS changes.

…ing the # of frames to skip, one for setting the % of frames to skip based off fps
Copy link
Collaborator

@unknownbrackets unknownbrackets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, so this means I can only set frameskip up to 8%?

-[Unknown]

Windows/MainWindow.h Outdated Show resolved Hide resolved
@mrfixit2001
Copy link
Contributor Author

mrfixit2001 commented Nov 3, 2018 via email

Windows/MainWindowMenu.cpp Outdated Show resolved Hide resolved
Windows/MainWindowMenu.cpp Outdated Show resolved Hide resolved
Copy link
Contributor Author

@mrfixit2001 mrfixit2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've committed the changes you've requested.

@mrfixit2001
Copy link
Contributor Author

Should be all resolved, let me know if you have any other changes! Thanks!

@@ -503,6 +503,17 @@ static void DoFrameDropLogging(float scaledTimestep) {
}
}

static int CalculateFrameSkip() {
// Used to calculate the FPS to skip if the user sets the type to percent of fps
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be moved into the right clause of the if statement below.

Besides, does this mean that since you can only set it up to 8, frameskip% can only be up to 8%?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed that this was already discussed above. But what's the point of such a low frameskip percentage limit? Shouldn't we change the scale entirely when the type is set to percentage?

@mrfixit2001
Copy link
Contributor Author

mrfixit2001 commented Nov 4, 2018 via email

@hrydgard hrydgard added this to the v1.8.0 milestone Nov 4, 2018
@hrydgard hrydgard merged commit 7561af3 into hrydgard:master Nov 4, 2018
@Leopard20
Copy link
Contributor

Leopard20 commented Nov 6, 2018

I really don't see this making any difference conpared to the previous setting. Even a value as low as 1% gives the same FPS as the previous 1 Frame setting.

Edit: Never mind. It's because you calculate the ceiling. I didn't realize that FPS has to be an int!

@mrfixit2001
Copy link
Contributor Author

mrfixit2001 commented Nov 6, 2018 via email

@ghost
Copy link

ghost commented Nov 9, 2018

means I don't need to set frameskip 1 or 2 on the game, is that so?
just set it to percent of current, is that so?

@mrfixit2001
Copy link
Contributor Author

mrfixit2001 commented Nov 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants