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

api to skip frames #767

Open
yamt opened this issue Oct 1, 2024 · 0 comments
Open

api to skip frames #767

yamt opened this issue Oct 1, 2024 · 0 comments

Comments

@yamt
Copy link
Contributor

yamt commented Oct 1, 2024

for games, it's often more important to provide a constant game speed than drawing every single frames.
it would be nicer for wasm4 to provide a mechanism for skipping frames.
especially for graphics-heavy games on slow hardware.

eg. a simple timestamp (maybe in fps) on the shared memory area.

static unsigned int n = 0;

update()
{
  if (TIMESTAMP > n++) {
    /* somehow reduce computation for this frame */
  }
}
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