Log In  

At the beginning of their draw cycle some carts use


instead of


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?

P#63303 2019-04-07 13:51 ( Edited 2019-04-07 16:10)

Can you qualify most? I’ve reviewed a good deal of carts, and never saw that pattern!

And yeah, totally useless!

P#63305 2019-04-07 16:05

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.

P#63306 2019-04-07 16:07

It's in Breakout Hero for example. The funny thing is, cls(1) is commented out.

Cart #53976 | 2018-07-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#63307 2019-04-07 16:09

Cls takes an argument at least since 2016!
I suspect some dev just don’t read the docs ;)

P#63324 2019-04-08 06:49
:: Felice

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().

P#63520 2019-04-14 23:20

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-09-18 17:05 | 0.019s | 4194k | Q:31