Raccoon Tweetcarts
2021-07
I had some fun playing around with data compression this month.
My first result was fine enough:
playing around with data compression; the source code (next tweet) is only 279 bytes!#pico8 #tweetcart pic.twitter.com/pddyY1JbKq
— pancelor (@pancelor) July 22, 2021
but it wasn’t very eye-catching. So I tried again, and I love what I made:
Washing Dinner At Sunset#pico8 #tweetcart #pixelart pic.twitter.com/tmUGI8U4Jl
— pancelor (@pancelor) July 23, 2021
Here’s the code:
fillp(0x8520.2)pal{[0]=2,4,9,15}::_::for i=0,255do
x=i%16*8+rnd(3)-1y=i\16*8+(i\16+t()*2)%4rectfill(x,y,x+7,y+7,ord("?????_ISS_A=USda4RTX+HUXT0QeYPDHYiYiPiiEgiiY+?:iiJ>JfU:VH*X@ga1RTcQV>D?7:>OP@??O@@>?S,",1+i\3)-42>>i%3*2&3)end
?"\^4\^j00"
goto _
That long string in the middle ("?????_ISS_A..."
) holds the image data; each character holds 6 bits of custom-encoded data.
When interpreted, those 6 bits are displayed as three 2-bit pixels.