Is there a recommended coding method that would eliminate the drop frames that occur when the pico8 window is turned to the back?
Or is there a memory address I can set?
I want to keep the number of times to execute _update60() and draw() the same, even at 30fps.
Do you mean the PICO-8 program drops frames when it is not the active window?
If so, edit your config.txt and try changing the foreground/background thread sleep settings:
// :: System Settings foreground_sleep_ms 2 // number of milliseconds to sleep each frame. Try 10 to conserve battery power background_sleep_ms 10 // number of milliseconds to sleep each frame when running in the background
Yeah, that's exactly what it is. It's a drop frame that occurs in an inactive window.
Yes, that config.txt confirms that you can do it!
However, that setting is only for my environment, and it doesn't seem to be valid in other users' environments when I export the cart.
For example, if I use _update60() to do all the work I'm doing with _draw(), I can confirm that I don't get the "Misalignment of production" even if I'm at 30fps.
Does this approach cause any other problems?
In that case it might be an export bug or missing feature that @zep needs to look at.
You should post it in the support/bugs forum for him to see.
Personally I feel like an executable export probably shouldn't sleep more in the background.
[Please log in to post a comment]