{"name":"digital dash","description":"-- digital dash\n-- alexthescott\n-- 9/1/21\n\np={8,136,130,11,139,131,12,140,129}\npal(p,1)\n\nfunction new_screen()\n\ts={}\n\tfor i=0,128 do\n\t\tadd(s,{'v',i})\n\t\tadd(s,{'h',i})\n\tend\n\treturn s\nend\n\nfunction new_beam(c)\n\tp=screen[1+rnd(#screen)\\1]\n\tdel(screen,p)\n\n\tb={}\n\tb.c=c\n\tb.o=p[1]\n\tb.d=rnd(2)\\1\n\t\n\tif b.o=='v' then\n\t\t-- top\n\t\tif b.d==0 then\n\t\t\tb.x=p[2]\n\t\t\tb.y=1\n\t\t\tb.dx=0\n\t\t\tb.dy=1\n\t\t-- bottom\n\t\telse\n\t\t\tb.x=p[2]\n\t\t\tb.y=127\n\t\t\tb.dx=0\n\t\t\tb.dy=-1\n\t\tend\n\telseif b.o=='h' then\n\t\t-- left\n\t\tif b.d==0 then\n\t\t\tb.x=127\n\t\t\tb.y=p[2]\n\t\t\tb.dx=-1\n\t\t\tb.dy=0\n\t\t-- right\n\t\telse\n\t\t\tb.x=0\n\t\t\tb.y=p[2]\n\t\t\tb.dx=1\n\t\t\tb.dy=0\n\t\tend\n\tend\n\t\n\tb.draw=function(self)\n\t\trectfill(self.x,self.y,self.x+1,self.y+1,self.c)\n\tend\n\t\n\tb.update=function(self)\n\t\tself.x+=self.dx\n\t\tself.y+=self.dy\n\tend\n\t\n\tadd(beams,b)\nend\n\nfunction burn()\n\tfor p=0,1000 do\n\t\tx=rnd(128)\\1\n\t\ty=rnd(128)\\1\n\t\tpc=pget(x,y)\n\t\tif pc%3!=0 then\n\t\t\t-- herein lies our anomaly\n\t\t\tpset(x,y,p+1)\n\t\telseif rnd(4)\\1==0 then\n\t\t\tpset(x,y,0)\n\t\tend\n\tend\nend\n\nscreens={}\nscreen=new_screen()\n\nbeams={}\n\nglobal_index=1\n\ncls()\n::♥::\nif t()<2 then\n\tprint(\"digital dash\",40,64,1)\nelse\n\tburn()\n\t\n\tif #screen<4 then\n\t\tscreen=new_screen()\n\t\tglobal_index+=3\n\t\tglobal_index%=9\n\tend\n\t\n\tif t()%0.5==0 then\n\t\tfor i=1,4 do \n\t\t\tnew_beam(global_index)\n\t\tend \n\tend\n\t\n\tfor b in all(beams) do\n\t\tb:draw()\n\t\tb:update()\n\tend\n\t\n\tflip()\nend\ngoto ♥","tags":["pico-8","pico8"],"symbol":"OBJKT","artifactUri":"ipfs://QmRmtHt2WcRcJy56KSx2XwsamVJdsP2XYkdyHKzUGJJprd","displayUri":"ipfs://QmaAfV1MWM6ddt9CoeuZPkxSxUtiPefdCGqwE8fyDyhipo","thumbnailUri":"ipfs://QmaAfV1MWM6ddt9CoeuZPkxSxUtiPefdCGqwE8fyDyhipo","creators":["tz1St3n29AbYXZXV8W1BG41qYzz86J2CFAW7"],"formats":[{"uri":"ipfs://QmRmtHt2WcRcJy56KSx2XwsamVJdsP2XYkdyHKzUGJJprd","mimeType":"application/x-directory"}],"decimals":0,"isBooleanAmount":false,"shouldPreferSymbol":false}