Log In  

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.

P#83056 2020-10-18 03:05

:: Felice

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
P#83058 2020-10-18 07:47 ( Edited 2020-10-18 07:47)

Thanks, @Felice.

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?

P#83060 2020-10-18 08:44
:: Felice

Which format are you exporting to? HTML, executable, PNG?

P#83062 2020-10-18 09:30

It's an executable file format.

P#83063 2020-10-18 09:40
:: Felice

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.

P#83069 2020-10-18 12:53 ( Edited 2020-10-18 12:54)


I understand.
I'll make a suggestion for config later.

Thank you!

P#83074 2020-10-18 14:20

exe exports handle the config file just like pico-8 itself.
it means 2 things:

  • pico-8 AND exe exports all share the same config.txt on one system
  • an exe export will create a default config.txt on a new system
P#83091 2020-10-18 22:38

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-10-25 22:09 | 0.026s | 2097k | Q:30