Log In  

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.

screenshot of doodad

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.

P#102884 2021-12-16 02:18

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.

P#102887 2021-12-16 02:24

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:

-- deep magic:
-- i have no idea how this runs
-- it shouldn't... but does
function dance(x,y,t)
    local e,f = cocreate(wait)
    repeat
    rectfill(x,y,x+40,y+40,0)

    --m = rnd(0xffff) % 10
     local cx = x + r'8'
     local cy = y + r'8'
    if time() % .3 < .01 then
        f = not f
    end
    thor(cx,cy,f) -- draws from spritesheet
    flip()
    --yield()
    until not coresume(e,t)
end

P#102888 2021-12-16 02:36

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.

P#102889 2021-12-16 02:56

I did end up ending inserting flip()s between most of the empty repeat untils 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

P#102903 2021-12-16 10:49

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 01:46:42 | 0.019s | Q:17