At the beginning of their draw cycle some carts use
cls() rectfill(0,0,127,127,color) |
instead of
cls(color) |
Is that for performance reasons? Does it perform better if you call rectfill with your background color? Or is it because the color option for cls was introduced in a later version of pico-8?
Can you qualify most? I’ve reviewed a good deal of carts, and never saw that pattern!
And yeah, totally useless!
It was undocumented and therefore considered unstable at first. I don't know when exactly that changed, but the wiki wasn't updated until last June.
It's in Breakout Hero for example (cart #53976). The funny thing is, cls(1) is commented out.
Cls takes an argument at least since 2016!
I suspect some dev just don’t read the docs ;)
I'm pretty sure at one point one of the two was significantly faster than the other. However, now they are equal in speed, so if you're clearing the entire screen, it's more efficacious just to call cls().
[Please log in to post a comment]