1K Jetpac #Pico1k

A Jetpac (ZX Spectrum, 1983) demake in 1023 Compressed Bytes of code for PICO-1K Jam 2023  #Pico1k

You have to rebuild your rocket in order to explore different planets, while simultaneously defending against hostile aliens.

How to play

Collect the parts of the spaceship in the following order:


Drop the part you have collected over the base piece.

Code:

cls()?"\^:f4167717f7f703b3\^:2d6dedefefefc0cd\^:0000c0e060c000f0\^:0000030404030003\n\^:e0f070505050f000\^:070f0e0a0a0a0f00\^:a8a828b0e0082000\^:3f0d020707060e00\n\^:80c0c0c0e0e0e000\^:0102020205050500\n\^:18fe525a521afe18\^:187f69696d497f18"
memcpy(0,3*8192,8192)_set_fps(60)g={}p={{6,15,10},{1,5,4},{12,7,14},{0,15,5},{5,10,8},{11,15,15}}for q in all(p)do
for i=q[1],q[3]do
mset(i,q[2],4)end
add(g,{x=q[1]*4+q[3]*4+4,y=q[2]*8-4})end::r::l=1s=0::s::x=64y=64z=1u=0v=0p={}w={}r=0n=2k=0::_::cls(1)pal(0,3)palt(0,nil)map()pal()?"s:"..s
if(#p<l+5)a=rnd(2)\1add(p,{x=-16+a*160,y=16+rnd(96),u=.25-a+rnd(.5),v=rnd(.5)-.25,l=1})
r-=1c=btn()a=c\2%2-c%2b=c\8%2-c\4%2if(a!=0)z=a
if(btn(4)and r<0)r=20add(w,{x=x,y=y,u=z,t=30,l=1})
u+=a*.1v+=b*.1u=mid(-1,1,.99*u)v=mid(-1,1,.99*v+.03)x=(x+u)%128y=mid(8,113,y+v)for i=0,7do
j=i*2+(i>3and 1or 0)a=cos(j/8)b=sin(j/8)if(mget((x+a*7)\8,(y+b*7)\8)>0)e=max(.2,a*u+b*v)u-=a*e*1.5v-=b*e*1.5break
end
for i=0,5do
a=g[i+1]b=min(i,3)*16
if(n<=i*2)spr(b,a.x-8,a.y-4,2,1)
if(n==i*2and max(abs(a.x-x),abs(a.y-y))<4)n+=1
if(n==i*2+1)spr(b,x,y,2,1)
if(n==i*2+1and abs(x-84)<4)n+=1
if(n>i*2+1and i<3)spr(b,76,112-i*8,2,1)
end
if(n>11)l+=1goto s
for q in all(p)do
q.x+=q.u
q.y+=q.v
circfill(q.x,q.y,3,9)if(q.x!=mid(-16,160,q.x))q.l=0
if(mget(q.x\8,q.y\8)>0)q.l=0
if(max(abs(q.x-x),abs(q.y-y))<6)goto r
if(q.l<=0)del(p,q)
end
for o in all(w)do
o.t-=1a=o.x
while(a==mid(128,a)and mget(a\8,o.y\8)<1)a+=o.u*4
line(o.x,o.y,a,o.y,o.t\6+1)for q in all(p)do
b=o.y-q.y
if(o.l>0and b==mid(-3,3,b)and q.x==mid(o.x,a,q.x))s+=1q.l-=1o.l=0
end
if(o.t<=0)del(w,o)
end
spr(2,x-8,y-8,2,2,z<0)flip()goto _
StatusReleased
PlatformsHTML5
Rating
Rated 4.0 out of 5 stars
(2 total ratings)
AuthorSkyBerron
GenreAction
Made withPICO-8
Tagspico1k, PICO-8

Comments

Log in with itch.io to leave a comment.

Great game, its really challenging.