{"name":"block cloud","description":"-- block cloud\n-- alexthescott\n-- 8/16/21\n\np={12,-29,1,8,-25,2,11,-26,3}\npal(p,1)\nbg={0}\n\nfunction new_vert()\n\tlocal v={}\n\tv.w=10*(2+rnd(2))\\1\n\tv.h=10*(2+rnd(2))\\1\n\tv.x=rnd(127)\\1\n\tv.c=rnd(3)\\1\n\tv.f=rnd(2)\\1\n\tif v.f==0 then\n\t\tv.y=0-v.h\n\telse\n\t\tv.y=127+v.h\n\tend\n\t\n\tv.draw=function(s)\n\t\tfor x=s.x, s.x+s.w do\n\t\t\t\tif x%(2+v.c*2)==0 then\n\t\t\t\t\tif v.c==0then\n\t\t\t\t\t\tc=1\n\t\t\t\t\telseif v.c==1then\n\t\t\t\t\t\tc=4\n\t\t\t\t\telse\n\t\t\t\t\t\tc=7\n\t\t\t\t\tend\n\t\t\t \tline(x,s.y,x,s.y+s.h,c)\n\t\t\t\tend\n\t\tend\n\tend\n\t\n\tv.update=function(s)\n\t\tif s.f==0 then\n\t\t\ts.y+=1\n\t\telse\n\t\t\ts.y-=1\n\t\tend\n\tend\n\t\n\treturn v\nend\n\nfunction new_hori()\n\tlocal h={}\n\th.w=10*(2+rnd(2))\\1\n\th.h=10*(2+rnd(2))\\1\n\th.y=rnd(127)\\1\n\th.c=rnd(3)\\1\n\th.f=rnd(2)\\1\n\tif h.f==0 then\n\t\th.x=0-h.w\n\telse\n\t\th.x=127+h.w\n\tend\n\t\n\th.draw=function(s)\n\t\tfor y=s.y, s.y+s.h do\n\t\t\t\tif y%2==0 then\n\t\t\t\t\tif h.c==0then\n\t\t\t\t\t\tc=1\n\t\t\t\t\telseif h.c==1then\n\t\t\t\t\t\tc=4\n\t\t\t\t\telse\n\t\t\t\t\t\tc=7\n\t\t\t\t\tend\n\t\t\t \tline(s.x,y,s.x+s.w,y,c)\n\t\t\t\tend\n\t\tend\n\tend\n\t\n\th.update=function(s)\n\t\tif s.f==0 then\n\t\t\ts.x+=1\n\t\telse\n\t\t\ts.x-=1\n\t\tend\n\tend\n\t\n\treturn h\nend\n\nfunction new_clear()\n\tlocal clr={}\n\tclr.i=1\n\t\n\tclr.update=function(s)\n\t\ts.i+=1\n\tend\n\t\n\tclr.draw=function(s)\n\t\tline(s.i,0,0,s.i,0)\n\t\tline(256-s.i,0,0,256-s.i,0)\n\tend\n\t\n\tclr.destroy=function(s)\n\t\treturn s.i>=256\n\tend\n\t\n\treturn clr\nend\n\nswipe={}\nblob={}\nadd(blob,new_vert())\nadd(blob,new_hori())\n\ntimer=0.0625\n\ncls(0)\n::♥::\nif t()<2 then\n\tprint(\"block cloud\",42,64,1)\nelse\n\t--burn pixels\n\tfor c=0, 2048 do \n\t\tlocal x=rnd(128)\n\t\tlocal y=rnd(128)\n\t\tlocal f=pget(x,y)\n\t\tif f%3>0 then\n\t \tpset(x,y,f+1)\n\t end\n\tend\n\t\n\tif t()%60==0or btn(5) or btn(4) then\n\t\tadd(swipe,new_clear())\n\tend\n\t\n\tfor clr in all(swipe) do\n\t\tclr:draw()\n\t\tclr:update()\n\t\tif clr:destroy() then\n\t\t\tdel(swipe,clr)\n\t\tend\n\tend\n\t\n\tfor b in all(blob) do\n\t\tb:draw()\n\t\tb:update()\n\t\tif b.f==0 then\n\t\t\tif b.x>=128 or b.y>=128 then\n\t\t\t\tdel(blob,b)\n\t\t\tend\n\t\telse\n\t\t\tif b.x<=0-b.w or b.y<=0-b.h then\n\t\t\t\tdel(blob,b)\n\t\t\tend\n\t\tend\n\tend\n\t\n\tif time()%timer==0 then\n\t\tadd(blob,new_hori())\n\t\tadd(blob,new_vert())\n\t\ttimer=(1+rnd(2))\\1\n\tend\nend\nflip()\ngoto ♥","tags":["pico8"],"symbol":"OBJKT","artifactUri":"ipfs://QmXxWaXMUtbmJQdhhb6RXg5CPi9p6ApFGwJoL4gU7Rq82d","displayUri":"ipfs://QmbwQhEEk4PcgEJribSmg1dze4oQZ5KxcbxYC3msH59Go4","thumbnailUri":"ipfs://QmbwQhEEk4PcgEJribSmg1dze4oQZ5KxcbxYC3msH59Go4","creators":["tz1St3n29AbYXZXV8W1BG41qYzz86J2CFAW7"],"formats":[{"uri":"ipfs://QmXxWaXMUtbmJQdhhb6RXg5CPi9p6ApFGwJoL4gU7Rq82d","mimeType":"application/x-directory"}],"decimals":0,"isBooleanAmount":false,"shouldPreferSymbol":false}