Log In  


The manual implies that the line-continuation syntax might allow for this...

line( 10,10, 20,10, 1 )
line(        20,20, 2 )
line(        10,20, 3 )
line(        10,10, 4 )

...which would make a rectangle with four differently-colored sides.

But PICO-8 seems to interpret line(x2,y2,col) as line(x1,y1,x2,0).

1


I got the idea that it was just line(x1,y1) added as a continuation, not line(x1,y1,c). I suppose if you want to change color, you could stick a color(c) in between the line() statements.


Yeah, of course, but ain't nobody got time for a whole color(c) call. ;)

I just think that, since a 3-arg line() doesn't make sense any way other than line(x,y,c), it does seem intuitive.

Anyway, if it's not to be, then I'd just nitpick that the manual shouldn't look like this:

line x0 y0 [x1 y1] [col]

But rather like this:

line x0 y0 [x1 y1 [col]]

But I'd still prefer that it worked like this:

line [x0 y0] x1 y1 [col]

:P


Also, while I brought it up mostly as a matter of intuition & convenience, there's also performance to consider.

If you look at the code for this recent Tunnel Effect demo by @Catatafish, where performance is definitely an issue, you can imagine a couple of cycles might be saved by turning this:

    color(texture[(prevu+prevv*texsize)%tsz])
    line(x,y)

Into this:

    line(x,y,texture[(prevu+prevv*texsize)%tsz])

In those tight inner loops where the 90/10 rules apply, a few cycles can matter.



[Please log in to post a comment]