-
Notifications
You must be signed in to change notification settings - Fork 10
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
Frame-rate system variable doesn't seem to do anything #28
Comments
Calculate actual framerate, so referencing `frame-rate` works. This fixes issue #28 .
I hope the commit fixes the problem. I am working on improving the frame rate when bitmaps are used, Currently Sketching draws everything into an off-screen bitmap This makes it easy to support In the mean time - send me a message if you see something with |
Ok this fixes it for me, thank you! But I'm gonna suggest that you don't make the frame rate an average, but give instantaneous frame times instead. This makes it easier to see hiccups, which I think is useful for performance tuning. As far as performance, I notice the frame rate seems to hover beneath the target frame rate, even though the system is technically capable of maintaining the target frame rate. So for example, in my testing if I set a sketch to run at 30 fps, it runs around 24-26 fps pretty consistently. However if I set it to 60fps, it hovers around 43-47fps, which seems to suggest that the program is capable of maintaining a consistent 30fps possibly. This is on Windows 10. If you want to try this yourself, my methodology is to take the little game I cloned and (after disabling the averaging on the framerate) save the frame rate of every frame into a list. Then I plot the list of frame rates with my plotting quickscript to visualize it, which I find useful. |
Great to hear the fix works. Wrt using the average instead of instanteneous, I am following the lead of
The way I use it, is simply to use I have noticed the same phenomenon that the actual fps is lower than the intended frame rate. https://github.com/soegaard/sketching/blob/main/sketching-lib/sketching/gui.rkt#L333 It's a great idea to plot the fps as a function of time. |
I made it public now, whoops |
Great game! Fun and hard in true Asteroids tradition. |
Printing the frame-rate variable always shows 10, at least on Windows. This is even the case when I try the example in the documentation.
The text was updated successfully, but these errors were encountered: