Log In  

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.

Pls halp!

P.S.: It works just fine on Linux on the same machine with the same cart and default config.

Relevant 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%

Soft/hardware:

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

Cartridge:


Cart #cube_warld-3 | 2021-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#87885 2021-02-19 12:35 ( Edited 2021-02-21 15:44)

Can you share the cart?

P#87891 2021-02-19 15:10

@merwok Here you go. I don't think it's the cart's fault, it works fine on web and on my Linux. I presume it's either my OS or my config.

P#87893 2021-02-19 15:49 ( Edited 2021-02-19 15:51)
1

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.

P#87913 2021-02-20 02:53

@shy thanks, I went through my graphics settings and it turned out I had set a 30 FPS limit in my nvidia settings. I changed it to 60 and it runs smoothly now.

P#87974 2021-02-21 15:43

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-03 10:13:41 | 0.030s | Q:21