The new BBS 4.0 "cart menu" (the one that slides over and covers the screen and shows other carts) is really cool! However, it seems it allows music to continue playing, while not running _update on the cart. This will basically completely break some audio synchronization stuff I do with stat calls in some of my carts (I do this heavily in one which is going to be released very soon!)
You can see an obvious demonstration of the issue with this cart, which displays the notes that it sees are playing: https://www.lexaloffle.com/bbs/?pid=28685
Until now, I did not see a way for music to play without the update method being called for so long (besides minor frame drops, which I do some work to account for), and this feels kind of like a violation of a basic assumption (at least an assumption I had) with the API so I'm hoping this web behavior can be changed so that the cart is either completely paused or completely running, and not a weird in-between state? @zep
IMHO, This is a serious bug as it breaks the fantasy that Pico-8 is a physical piece of retro hardware.
8-bit hardware was always single-tasked and deterministic, so the sort of timing tricks @kittenm4ster describes were relatively common among real 8bit dev.
I also have a cart that relies on code being executed at certain points during a song (though I don't have an _update function or even a call to flip()) and yeah, it looks like if you pause the cart the song keeps playing but the code (which is supposed to retune the song's key at the start of each section) never executes.
I just noticed this issue also exists when switching focus away from the browser tab; the music continues playing without calling _update, on both mobile and desktop browsers, it seems.
And somewhat similarly to the cart in the previous post, it completely mangles the music in the sax solo and afterwards in my defrag cart :( since that uses at-runtime SFX swapping to get more music than can fit in the SFX slots.
Yes, this is extremely wrong. The rule is supposed to be that sound is only mixed exactly when the cart is actually running.
I've fixed the pause and cart menu syncing, and will come back to the issue of sound continuing when in a different tab soon.
[Please log in to post a comment]