Okay so, I'm not sure if this is a bug per se, but it is quite an anomaly and it's annoying & concerning me.
I am trying to work on an annual cart I make after several years(!?) of not keeping up with PICO-8 and this little... doodad keeps popping up in the corner when I run the cart.
This little 9-squared square keeps flashing/spinning in the corner with pink, white & blue dots.
It seems to show up after about 5 or 6 seconds no matter what I do (okay, and now I just noticed that some terrible hack which used to work is not working anymore... hmm).
So, I am asking, WHAT IS IT??? Why is it showing up? And will it show up in HTML exports/on the BBS?
I should note, in case it's relevant, that the cart doesn't use _update or _draw, and makes use of a lot of repeat until condition
.
I've seen that a few times too. I think it means the Pico-8 system is very busy. If you're not going to use _draw() or _update(), add a few flips(), that might remove it.
Thanks, that's very helpful dw817!
The code is pretty bad, so I probably needed to refactor it again anyway. :P
For example, the code that no longer works:
Oh, you're doing cocreate(), that's outside my knowledge, @JeremyRedhead.
I will tell you, likely you don't need to use RND(0xFFFF), instead use RND(N) for a number from 0 to N-1 that is floating point.
To have it integer, use RND(N)\1
The rest of the code looks alright to me. Try without COCREATE(), CORESUME(), and YIELD() and see if that doesn't remove the pixel pattern of busyness.
I did end up ending inserting flip()
s between most of the empty repeat until
s which fixed the issue, but it still bothers me... it's not that the CPU is busy, b/c an empty loop is not a high workload... is it trying to detect/indicate code it thinks is "stuck" or faulty? IDK
As to your points @dw817, the r(n)
is a helper function that does rnd(0xffff) % n
and come to think of it, you're right. I have no idea why I did it that way... PICO-8 didn't use to implicitly floor any modulated number, did it?
The use of coroutines there was a function of my laziness/over-engineering at the time; I should've just directly done what wait
does:
s = time() repeat -- whatever until time() - s > t // t is length of time |
Which is what I did to fix the code for 0.2.4
[Please log in to post a comment]