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

ebiten: deprecate SetFPSMode and ScheduleFrame, and undeprecate SetVsyncEnabled #2342

Closed
hajimehoshi opened this issue Sep 21, 2022 · 4 comments
Milestone

Comments

@hajimehoshi
Copy link
Owner

We discussed #2338 and FPSModeVsyncOffMinimum is useless: as the vsync is off, tearing happens and GPU power is consumed more than necessary. We might want FPSModeVsyncOnMinimum but it is odd that a FPS mode affects Update behavior in the first place.

Instead, let's give up blocking Update call for input, and instead, let's focus on a new API to handle input (#1704). This (Update is still called 60 times per second) might not be the best efficiency but is acceptable.

At the same time, ScheduleFrame should be deprecated too.

@hajimehoshi hajimehoshi added this to the v2.5.0 milestone Sep 21, 2022
@erexo
Copy link
Contributor

erexo commented Oct 3, 2022

If we are in an FPS area, I would like to remind that it would be really useful to be able to explicitly set the maximum FPS somehow, #1562 .
Players with old computers are deliberately reducing their FPSes to be able to use the system while the game is running, and game developers (especially beginners) would be able to debug the game and check if FPS has any negative impact on the game (ie. if there is any logic in Draw that should be in Update)

@hajimehoshi
Copy link
Owner Author

But how do I adjust FPS (refresh rate)?

@hajimehoshi hajimehoshi changed the title ebiten: deprecate SetFPSMode and undeprecate SetVsyncEnabled ebiten: deprecate SetFPSMode and ScheduleFrame, and undeprecate SetVsyncEnabled Oct 22, 2022
@hajimehoshi hajimehoshi reopened this Jan 2, 2023
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jan 2, 2023

We'll revert the optimization of skipping to swap buffers.

@hajimehoshi
Copy link
Owner Author

I think we should make another issue.

hajimehoshi added a commit that referenced this issue Jan 2, 2023
This caused some issues in various environments. Until we find a good
solution, let's disable this.

Updates #2341
Updates #2342
Closes #2518
hajimehoshi added a commit that referenced this issue Jan 2, 2023
This was reverted at a049acd but now
I've confirmed this is not problematic only with OpenGL.

Updates #2341
Updates #2342
hajimehoshi added a commit that referenced this issue Jan 3, 2023
With Metal, nextDrawable could return immediately when a command buffer
is empty. To avoid high CPU usage, this change adds a slight sleep in
this case.

With DirectX, Present waits for a while even though nothing is updated,
then that's fine.

Updates #2341
Updates #2342
Updates #2520
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

No branches or pull requests

2 participants