Space is full of rocks and doors. Avoid them.

A game in 1024 Compressed Bytes of code for PICO-1K Jam 2022 #Pico1k

Code:

poke(24405,0)p={}
for i=1,128do
p[i]={rnd(128)&124,rnd(128)&124}end
for j=128,0,-1do
for i=1,8do
q=p[i]circfill(q[1],q[2],j,j%16)
circfill(q[1],q[2]-128,j)
circfill(q[1],q[2]+128,j)end
end
memcpy(20*2048,0,4*2048)
rectfill(8,0,31,15,0)?"\f1\^:1818181842c3db7e\b\f2\^:000024243c3c2400",8,0
rectfill(16,0,31,15,1)circfill(24,8,7,0)
pal(1,0)for i=32,112,16do
spr(2,i,0,2,2)end
memcpy(24*2048,0,2048)
for j=128,0,-1do
for i=1,128do
q=p[i]circfill(q[1],q[2],j,i%16)
circfill(q[1],q[2]-128,j)
circfill(q[1],q[2]+128,j)end
end
memcpy(16*2048,0,4*2048)
poke(24405,96)_set_fps(60)h=0s=0::s::h=max(h,s)x=64y=99z=0g=99e=64f=-64v=2o=0
p={}::_::for i=0,15do
a=(i-t())/2%8\1pal(i,10+min(a,8-a))end
memcpy(0,16*2048,2048)a=t()*8%128palt(0,nil)spr(0,0,a-128,16,16)spr(0,0,a,16,16)
if o<1then
pal()?"\^w\^tspace doors",24,32,3
?"\nscore:"..s
?"\nhighscore:"..h
if(btnp(5))o=1s=0
else
z-=1g-=1f+=v/2b=btn()u=b\2%2-b%2x=mid(x+u,128)y=mid(y+b\8%2-b\4%2,124)
if(btn(4)and z<0)z=8add(p,{x=x+rnd(6)-3,y=y-2,c=0,d=-2,i=0,l=1})?"\as3c"
if(g<0)g+=64a=rnd(128)c=atan2(rnd(128)-a,160)add(p,{x=a,y=-32,c=v*cos(c),d=v*sin(c),i=1,j=4+rnd(6)\1*2,l=3})
if(f>160)e=rnd(96)\1f-=200v+=.02
for i=0,15do
a=(i-t()*8)%8\1pal(i,5+min(a,8-a))end
memcpy(0,20*2048+64*e,2048)m=32-20*sin(t()/2)a=16+e-m
if(a>0)sspr(0,0,a,32,0,f-16)
a=16+e+m
if(a<128)sspr(a,0,128-a,32,a,f-16)
memcpy(0,24*2048,2048)
for q in all(p)do
q.x+=q.c
q.y+=q.d
if q.i<1then
?"|",q.x-2,q.y,3
if(q.y<8)q.l=0
elseif q.i<2then
palt(0,1)spr(q.j,q.x-8,q.y-8,2,2)
for w in all(p)do
if w.i<1then
a=w.x-q.x
b=w.y-q.y
a/=10b/=10
if(a*a+b*b<1)q.l-=1del(p,w)s+=1?"\as3gec"
end
a=x-q.x
b=y-q.y
a/=8b/=8
if(a*a+b*b<1)goto s
if(q.y>160)q.l=0
end
end
if(q.l<1)del(p,q)
end
pal()spr(1,x-4,y-4)spr(1,x-4+u,y-4)
if(abs(16+e-x)>m-3and abs(f-y)<12)goto s
?s,4,4,3
end
pal({6,13,12,11,8,137,9,10,7,129,130,1,131,141},1)flip()goto _
StatusReleased
PlatformsHTML5
Rating
Rated 3.0 out of 5 stars
(1 total ratings)
AuthorSkyBerron
GenreShooter
Made withPICO-8
Tagspico1k, PICO-8

Leave a comment

Log in with itch.io to leave a comment.