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

await event.frameadvance() tied to VPS instead of FPS #13

Open
AngryMax opened this issue Apr 29, 2022 · 2 comments
Open

await event.frameadvance() tied to VPS instead of FPS #13

AngryMax opened this issue Apr 29, 2022 · 2 comments

Comments

@AngryMax
Copy link

Using "await event.frameadvance()" is dependent on VPS and not FPS. For instance, if you're getting 30 FPS, but 60 VPS, then "await event.frameadvance()" will execute twice per in-game frame. I tested this with:

while True:
    await event.frameadvance()
    print(f"frame advance!?")  

The above script outputs "frame advance!?" twice per frame in Super Mario Sunshine, a 30 FPS game, but only once per frame on the title screen of Luigi's Mansion, which runs at 60 FPS. Both, however, were running at 60 VPS. Here's a video demonstrating.

This doesn't seem intentional to me considering the readme example of frameadvance(), but if it is, I apologize😅 Thank you for your time!

@Felk
Copy link
Owner

Felk commented May 1, 2022

Hmm, you're right, frameadvance is currently tied to VPS. Thanks for bringing that to my attention, that indeed isn't intentional. I'm not sure how I'm going to fix that, since that requires checking whether the actual framebuffer was swapped, which isn't something I can easily do the way the code is structured right now. I have to think about this.

@Felk
Copy link
Owner

Felk commented Dec 12, 2022

The new framedrawn event might incidentally work the way you expected frameadvance to work. See also #25 (comment)

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