I have a couple of token count reducer functions:
function poke_map(loopx,loopy,offsetx,offsety) poke(0x5f38,loopx) poke(0x5f39,loopy) poke(0x5f3a,offsetx) poke(0x5f3b,offsety) end function unpack_split(s) return unpack(split(s)) end |
As of 0.2.3, the latter one of these, especially when combined with the former, as in
poke_map(unpack_split"4,4,64,32") |
has started to cause some weird behaviour in cases where cpu usage is high (around 80% or 90%).
The most obvious symptom is that actions triggered by a simple global timer (i.e. t += 1 in _update60()) start to occur prematurely when the unpack_split() function is called repeatedly in successive _draw() calls.
This sounds complicated enough that it would probably be helpful if you uploaded a full cart.
Also, just to confirm, does the bug go away if you change
poke_map(unpack_split"4,4,64,32")
back to
poke_map(4,4,64,32)
?
Yes, the bug indeed goes away when poke_map() is used with "normal" parameters, as in your example.
In addition, it seems at the moment that using unpack_split() with built-in Pico-8 functions like circ() or rectfill() does not cause this behaviour, but this is not yet fully confirmed.
I'll see to uploading a snippet that reproduces the bug accurately, thanks.
[Please log in to post a comment]