Play game
1K Geometry Asteroids #Pico1k's itch.io pageCompressed Bytes used
1023
Source Code (OPTIONAL)
_set_fps(60)poke(24405,0)for i=0,15do
a=29-i*2b=31-i
rect(b,i,a,i,12)rect(b,b,a,b)end
circfill(16,48,15,7)circfill(16,48,8,0)rectfill(0,64,31,95,7)rectfill(8,72,23,87,0)
poke(24405,96)for i=0,15do
a=i%4b=i\4c=a+b*16mset(2+a,b+2,c)mset(10+a,b+2,c+64)mset(18+a,b+2,c+128)end
poke2(24376,2056)h=0::r::r={}p={{x=64,y=64,z=.25,u=0,v=0,i=0,l=1,t=0}}o=p[1]n=2m=0l=5j=0s=0v=.25::s::k=99for i=1,n do
a=rnd()c=cos(a)d=sin(a)add(p,{x=o.x+64*c,y=o.y+64*d,z=rnd(),u=c*v,v=d*v,i=rnd(2)\1+1,l=20,t=0})end
::_::cls(1)pal(12,(k>0and t()%.5<.25)and 13or 12)k-=1
for w in all(r)do
if(w.i>0)a=w.x+w.u b=w.y+w.v line(w.x,w.y,a,b,w.i+8)w.x=a%128w.y=b%128
for q in all(p)do
c=(w.x-q.x+64)%128-64d=(w.y-q.y+64)%128-64
if max(abs(c),abs(d))<8and q.i>0then
if(w.i==1)w.l=0q.l-=1q.t=12
if(w.i<1and k<0)k=99l-=1
end
end
w.l-=1if(w.l<0)del(r,w)
end
for q in all(p)do
if q.i<1then
b=btn()q.z-=(b\2%2-b%2)/99c=cos(q.z)d=sin(q.z)e=(b\8%2-b\4%2)/50
q.u=(q.u-c*e)*.99
q.v=(q.v-d*e)*.99
j-=1if(j<0)j=15for i=0,m do a=q.z+(i-m/2)/64add(r,{x=q.x,y=q.y,u=cos(a)*3,v=sin(a)*3,i=1,l=20})end
for i=0,8,2do
a=2*i-8b=i-8e=8-i
add(r,{x=q.x+c*a-b*d,y=q.y+d*a+b*c,i=0,l=0})
add(r,{x=q.x+c*a-e*d,y=q.y+d*a+e*c,i=0,l=0})
add(r,{x=q.x+c*b-b*d,y=q.y+d*b+b*c,i=0,l=0})
add(r,{x=q.x+c*b-e*d,y=q.y+d*b+e*c,i=0,l=0})
end
else
q.z+=.01q.t-=1pal(7,q.t>0and 14or 7)
end
q.x=(q.x+q.u)%128q.y=(q.y+q.v)%128
for i=0,8do
b=q.x+(i%3-1)*128a=q.y+(i\3-1)*128
if min(a,b)>-32and max(a,b)<160then
c=-cos(q.z)/4d=sin(q.z)/4poke(24378,q.i*8)
for i=-16,15do
e=a-i
tline(b-16,e,b+15,e,4-c*16+d*i,4-d*16-c*i,c,d)end
end
end
if(q.l<0)s+=1for i=0,15do a=rnd()add(r,{x=q.x,y=q.y,u=cos(a),v=sin(a),l=20,i=2})end del(p,q)?"\a"
end
?h,9
?s
?"♥ "..l,99,1,8
if(#p<2)n=min(n+.5,10)m=min(m+.5,10)v+=.02goto s
if(l<1)h=max(s,h)goto r
flip()goto _
Leave a comment
Log in with itch.io to leave a comment.
Comments
Nice asteroid shooter! Good job getting upgrades in too, very nice touch!
Great used of TLINE on this entry.
The auto-fire is a nice touch, as it allows you to focus on the multiple hits required to bring down those pesky geometric baddies! 😅
Cool that you get upgrades too.
Nice one! 👍