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

More consistent render performance #34

Open
fengb opened this issue Jan 17, 2020 · 2 comments
Open

More consistent render performance #34

fengb opened this issue Jan 17, 2020 · 2 comments

Comments

@fengb
Copy link
Owner

fengb commented Jan 17, 2020

Gameboy renders the picture at a consistent 59.7275 Hz. This is a hardware limitation and cannot be delayed.

Monitors will never use this refresh rate, meaning we are unable to exactly match the “native” framerate. With the best monitors at tight tolerances, there's an extra frame every ~4s.

A notable manifestation of this waggle is ZAS, which requires consistent frame performance or the video has major artifacts. It exploits a hardware quirk by alternating every frame, creating a "transparent" background.

@fengb fengb changed the title More consistent render performance than requestAnimationFrame More consistent render performance Jan 17, 2020
@fengb
Copy link
Owner Author

fengb commented Jan 17, 2020

Idea:

  1. Introduce "frame number". This is always incrementing / wraps around.
  2. Render only when the frame number changes.
  3. (???) maybe only blend for incremental frames

@fengb
Copy link
Owner Author

fengb commented Dec 31, 2020

Another idea:

  1. Core steps by single frame
  2. Loop may advance multiple frames
  3. Blend all the generated frames together

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

1 participant