{"name":"bad portal alt","description":"-- bad portal alt\n-- alexthescott\n-- 9/8/20\n\np={143,142,133,13,141,130,140,131,129}\npal(p,1)\n\nfunction dist(x1,y1,x2,y2)\n\treturn sqrt((x1-x2)^2+(y1-y2)^2)\nend\n\nfunction new_particle(c)\n\tp={}\n\tp.x=64\n\tp.y=64\n\tp.xt=64\n\tp.yt=64\n\tp.a=rnd(1)\n\tp.oc=c\n\tp.c=c\n\tp.dx=cos(p.a)/4\n\tp.dy=sin(p.a)/4\n\t\n\tp.update=function(self)\n\t\tself.x+=self.dx\n\t\tself.y+=self.dy\n\t\t\n\t\tself.xt+=self.dx*0.75\n\t\tself.yt+=self.dy*0.75\n\t\t\n\t\tself.dx*=1.075\n\t\tself.dy*=1.075\n\t\t\n\t\td=dist(self.x,self.y,64,64)\n\t\t\n\t\tif d>52 then\n\t\t\tself.c=self.oc+2\n\t\telseif d>=32 then\n\t\t\tself.c=self.oc+1\n\t\tend \n\tend\n\t\n\tp.draw=function(self)\n\t\tline(self.x,self.y,self.xt,self.yt,self.c)\n\tend\n\t\n\tp.destroy=function(self)\n\t\treturn self.xt<=0 or self.xt>=128 or\n\t\t\tself.yt<=0 or self.yt>=128\n\tend\n\t\n\tp.debug=function(self)\n\t\trectfill(0,0,10,10,0)\n\t\tprint(self.d,0,0,7)\n\tend\n\t\n\treturn p\nend\n\nfunction new_orbit(c)\n\to={}\n\to.s=2\n\to.show=90+rnd(20)\\1\n\to.r=100\n\to.a=rnd(1)\n\to.ac=rnd(1)\n\to.av=0.005\n\to.c=c\n\to.x=64+cos(o.a)*o.r/2\n\to.y=64+sin(o.a)*o.r/2\n\t\n\to.update=function(self)\n\t\tself.a+=sin(self.ac)/200\n\t\tself.ac+=self.av\n\t\t\n\t\tif self.ac>=1 then\n\t\t\tself.tc=0\n\t\tend\n\t\t\n\t\tself.x=64+cos(self.a)*self.r/2\n\t\tself.y=64+sin(self.a)*self.r/2\n\tend\n\t\n\to.draw=function(self)\n\t\tcircfill(self.x,self.y,self.s,self.c)\n\tend\n\t\n\to.new_c=function(self,c)\n\t\tself.c=c\n\tend\n\t\n\treturn o\nend\n\nfunction burn()\n\tfor i=1,1200 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\tnc=rnd(2)\\1\n\t\t\tpset(x,y,pc+nc)\n\t\t\tpset(x,y-2,pc+nc)\n\t\t\tpset(x,y+2,pc+nc)\n\t\t\tpset(x-2,y,pc+nc)\n\t\t\tpset(x+2,y,pc+nc)\n\t\tend\n\t\tpset(x,y,0)\n\tend\nend\n\nglobal_color=7\nfc=0\n\nparticles={}\n\norbits={}\nfor i=1,10 do\n\tadd(orbits,new_orbit(global_color))\nend\n\n-- expanding lines, expanding circle\nring_r=50\nborder_r=10\n\ncls()\n::♥::\nif t()<2 then\n\tprint(\"bad portal alt\",36,64,7)\nelse\n\tburn()\n\t\n\tif fc>=2000 then\n\t\tfc=0\n\tend\n\t\n\tfc+=1\n\t\n\tif fc%2==0 then\n\t\tfor i=1,8 do\n\t\t\tadd(particles,new_particle(global_color))\n\t\tend\n\tend\n\t\n\tif fc%500==0 then\n\t\tglobal_color+=3\n\t\tglobal_color%=9\n\t\tfor o in all(orbits) do\n\t\t\to:new_c(global_color)\n\t\tend\n\tend\n\t\n\tfor p in all(particles) do\n\t\tp:update()\n\t\tp:draw()\n\t\tif p:destroy() then\n\t\t\tdel(particles,p)\n\t\tend\n\tend\n\t\n\tfor o in all(orbits) do\n\t\to:update()\n\t\tif fc%o.show<=80 then\n\t\t\to:draw()\n\t\tend\n\tend\n\t\n\tif fc%500>400 and fc%500<425 then\n\t\tcirc(64,64,ring_r,global_color)\n\t\tring_r+=0.25\n\telse\n\t\tring_r=50\n\tend\n\t\n\tif fc%500>300 and fc%500<350 then\n\t\t-- top left\n\t\tline(4,4,4+border_r,4)\n\t\tline(4,4,4,4+border_r)\n\t\t\n\t\t-- top right\n\t\tline(124,4,124-border_r,4)\n\t\tline(124,4,124,4+border_r)\n\t\t\n\t\t-- bottom right\n\t\tline(124,124,124-border_r,124)\n\t\tline(124,124,124,124-border_r)\n\t\t\t\n\t\t-- bottom left\n\t\tline(4,124,4+border_r,124)\n\t\tline(4,124,4,124-border_r)\n\t\t\n\t\tborder_r+=0.75\n\telse\n\t\tborder_r=10\n\tend\n\t\n\tcircfill(64,64,4,0)\nend\nflip()\ngoto ♥","tags":["pico-8","pico8"],"symbol":"OBJKT","artifactUri":"ipfs://QmaNft1pyYsiczsw18Z2zwx6BFnn4zzxwNzACaLarAC8tF","displayUri":"ipfs://QmSZR1Dvks6G7hCusdv76pjtckRa9WeMC5bfJyp79yesDG","thumbnailUri":"ipfs://QmSZR1Dvks6G7hCusdv76pjtckRa9WeMC5bfJyp79yesDG","creators":["tz1St3n29AbYXZXV8W1BG41qYzz86J2CFAW7"],"formats":[{"uri":"ipfs://QmaNft1pyYsiczsw18Z2zwx6BFnn4zzxwNzACaLarAC8tF","mimeType":"application/x-directory"}],"decimals":0,"isBooleanAmount":false,"shouldPreferSymbol":false}