Last active
September 27, 2023 19:22
-
-
Save andymasteroffish/3c9f3dea069655eb8b56c55579d08504 to your computer and use it in GitHub Desktop.
Compressed code for my #Pico1K Jam 2023 entry, Pico Mace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c=-1::i::d=1t=0e=198f={e=99,f=99,o=0,d=0,r=.9,i=15,t=12,h=3}i={f}h=0p=0r=1g=0for n=0,30do add(i,{e=rnd(e),f=rnd(e),i=4,t=5,h=4})if n<6then add(i,{e=90+n,f=90,o=0,d=0,r=.97,i=8,t=12,h=2})end end::e::l=rnd()if t%40<d then add(i,{e=99+cos(l)*e,f=99+sin(l)*e,i=1,t=8,h=4})end if t%8<1then add(i,{e=99+cos(l)*e,f=99+sin(l)*e,r=1,o=1-rnd(2),d=1-rnd(2),i=0,g=600,t=10,h=5})end t+=1if btn(0)then f.o-=.3end if btn(1)then f.o+=.3end if btn(2)then f.d-=.3end if btn(3)then f.d+=.3end camera(f.e-64+rnd(h),f.f-64+rnd(h))h=max(h-.7,0)g-=.02if g<0then r=1end for n in all(i)do a=1o=0if n.o then n.e+=n.o n.f+=n.d n.o*=n.r n.d*=n.r o=atan2(n.o,n.d)end if n.i<1then a,o=7,t/99end if n.i>8then a=4end if n.i==8then b=f.e-n.e v=f.f-n.f n.o+=b/50n.d+=v/50n.t=12if abs(n.o)+abs(n.d)<3then n.t=1end for e in all(i)do if e.i>7and abs(n.e-e.e)+abs(n.f-e.f)<n.i then b=n.e-e.e v=n.f-e.f n.o+=b/9n.d+=v/9end end end if n.i==1then o=atan2(f.e-n.e,f.f-n.f)n.e+=cos(o)*d n.f+=sin(o)*d a=4end if n.i<3then for e in all(i)do if e.i>7and e.t>9and abs(e.e-n.e)+abs(e.f-n.f)<8and d>0then if e==f then goto n else w=r h=4if n.i>0then r,g,h,w=min(10,r+1),1,8,r*10end p+=w s=n add(i,{e=n.e,f=n.f,r=1,o=.2,d=-.5,i=6,g=60,h=0,a=w})del(i,n)goto f end end end end if n.g then n.g-=1if n.g<0then del(i,n)end end line()for e=0,n.h do m=o+e/n.h line(n.e+cos(m)*a,n.f+sin(m)*a,n.t)end if n.a then?"+"..n.a,n.e,n.f,6 | |
end end rect(0,0,e,e,6)if d>0and(abs(f.e-99)>99or abs(f.f-99)>99)then goto n end camera(0,0)n="score:"..p if g>0then n=n.."\n𝘹"..r end if d<1then n=n.."\n high:"..c end?n,50-d*47,3,7 | |
if g>0then line(3,1,3+122*max(0,g),1)end if d<1then?"press ❎ to believe",27,99 | |
for n=2,0,-2do o=t/50?"⁶w⁶tpico\nmace",50+sin(o)*n,46+cos(o)*n,7-n | |
end if btn(5)then goto i end end if c<0then goto n end flip()cls()goto e::n::s=f del(i,f)d=0h=9c=max(c,p)goto f::f::j=5+s.i*2for n=0,j do o=n/j k=rnd(3)add(i,{e=s.e,f=s.f,o=sin(o)*k,d=cos(o)*k,r=1,i=5,t=s.t,h=2,g=15})end goto e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment