I tried making a 60 FPS game and noticed a weird behavior of my PICO-8: it's refresh rate stayed at 29-30 FPS even though the game was supposed to be running on 60 FPS according to stat(7) and CTRL-P widget. Movement looked choppy and the builtin FPS counter (stat(9) and show_fps config) shown 29-30 FPS. My monitor is capable of 60hz refresh rate and my CPU and GPU usage wasn't even remotely close to 100% (or even 8%, which is half of a processor core and can be a limit for single-threaded apps). It works properly on the web version.
P.S.: It works just fine on Linux on the same machine with the same cart and default config.
show_fps 1 foreground_sleep_ms 5 background_sleep_ms 10 host_framerate_control 0
Some stats and readings:
stat(7) and CTRL-P: 60/60 stat(9) and show_fps: ~30 stat(1) and CTRL-P: ~0.3 CPU usage: ~7% GPU usage (3D): ~30%
PICO-8 v.0.2.2 Windows 10 Intel core i7 gen9 Nvidia GeForce GTX (I don't know which exactly but not a bad one) Screen refresh rate 60hz
Do you have integrated graphics on your machine as well as a dedicated GPU? Windows 10 has a default behavior that often prioritizes the wrong graphics card when you have 2+ options, and I had framerate issues in a bunch of programs on my machine before I figured out what was causing that issue. I had to manually add program entries like Photoshop and Chrome (in Windows settings) to only use the right GPU too, because Windows refused to follow instructions from the nvidia control panel.
If that's not the problem... since Pico-8 is reporting 60fps I feel like this must be something on the OS side that's limiting your window's refresh rate without notifying the exe. A long time ago a similar 60 -> 30 fps issue happened when Pico-8 windows weren't active, but I think zep patched that. Might want to repost this in bugs if you still can't figure out what the problem is.
[Please log in to post a comment]