{"name":"bad fireworks","description":"Z and X launch more bad fireworks!\n\n-- bad fireworks\n-- alexthescott\n-- 8/24/21\n\np={1,140,2,136,3,139}\npal(p,1)\n\n-- contrived oop\nfunction add_splash()\n\tlocal b={}\n\t\n\tb.c=2+(rnd(3)\\1)*2\n\tb.sr=0\n\tb.br=1\n\tb.bv=0.25\n\tb.bm=(1+rnd(4)\\1)*3\n\tb.x=rnd(128)\n\tb.y=rnd(128)\n\t\n\tb.update=function(s)\n\t\ts.sr+=1\n\t\tif s.br>s.bm then\n\t\t\ts.bv=-0.25\n\t\telseif s.br<=0 then\n\t\t\ts.bv=0\n\t\tend\n\t\ts.br+=s.bv\n\tend\n\t\n\tb.draw=function(s)\n\t\tcirc(s.x,s.y,s.sr,b.c)\n\t\tif s.bv!=0 then\n\t\t\tcircfill(s.x,s.y,s.br,b.c)\n\t\tend\n\tend\n\t\n\tb.destroy=function(s)\n\t\tif s.bv==0 and s.sr>181 then\n\t\t\tdel(splash,s)\n\t\tend\n\tend\n\t\n\tadd(splash,b)\nend\n\n-- set btn delay\npoke(0x5f5d, 30)\n\nsplash={}\nbig_boom_count=0\nadd_splash()\n\ncls()\n::♥::\n-- burn pixels\nfor p=0,2048 do\n\tpx=rnd(128)\n\tpy=rnd(128)\n\tpc=pget(px,py)\n\tif pc!=0 and pc%2==0 then\n\t\tif rnd(2)\\1==0 then\n\t\t\tpset(px,py+1,pc)\n\t\tend\n\t\tpset(px,py,pc-1)\n\telse\n\t\tpset(px,py,0)\n\tend\nend\n\n-- little boom\nif t()%2==0 then\n\tadd_splash()\nend\n\n-- 20 sec 'big' boom\nif t()%20==0 then\n\tbig_boom_count=5\nend\n\nif big_boom_count>0 then\n\tif big_boom_count%1==0 then\n\t\tadd_splash()\n\tend\n\tbig_boom_count-=0.5\nend\n\n-- diy boom\nif btnp(4) or btnp(5) then\n\tadd_splash()\nend\n\n-- object loop\nfor s in all(splash) do\n\ts:draw()\n\ts:update()\n\ts:destroy()\nend\n\nflip()\ngoto ♥\n","tags":["pico8","pico-8"],"symbol":"OBJKT","artifactUri":"ipfs://QmYtr1M5Ub8FFR9CYbRiVcjqZhKxN28fUcBnkwyroM2QEW","displayUri":"ipfs://QmQZoAtYqGGgJF3yqBMmZK3XfjNj4KxLC3H44emAuNb55x","thumbnailUri":"ipfs://QmQZoAtYqGGgJF3yqBMmZK3XfjNj4KxLC3H44emAuNb55x","creators":["tz1St3n29AbYXZXV8W1BG41qYzz86J2CFAW7"],"formats":[{"uri":"ipfs://QmYtr1M5Ub8FFR9CYbRiVcjqZhKxN28fUcBnkwyroM2QEW","mimeType":"application/x-directory"}],"decimals":0,"isBooleanAmount":false,"shouldPreferSymbol":false}