Play game
Dodge The Missiles's itch.io pageHow many characters of code did you use?
555
Include your code here, if you'd like to show it off!
f,m,h,z=128,64,0,mid::s::x,y,t,p=m,m,1,{}_set_fps(60)::_::flip()for i=24576,32767do
poke(i,@(i)/3)end
t+=.01b=btn()x-=(b&1)-(b&2)/2
y-=(b&4)/4-(b&8)/8
x,y=z(x,f),z(y,f)for i=1,5 do
a=t+i/5
u,v=m+m*cos(a),m+m*sin(a)
?"●",u-3,v-2,8
c,d=x-u,y-v
e=(1+c*c+d*d)^.5
if(rnd()<t/1000)add(p,{x=u,y=v,u=c/e,v=d/e})
end
s=flr(t)h=max(h,s)for i,q in pairs(p)do
u,v=q.u,q.v
line(q.x,q.y,q.x+3*u,q.y+3*v,12)q.x+=u
q.y+=v
c,d=q.x-x,q.y-y
if(c==z(-3,c,3)and z(-3,d,3)==d)goto s
if(q.x!=z(q.x,f)or z(q.y,f)!=q.y)deli(p,i)
end
?"웃",x-3,y-2,9
?"s:"..s.."\nh:"..h,0,0,3
goto _
Leave a comment
Log in with itch.io to leave a comment.