1K Death Chase demake #Pico1k
Avoid crashing into a tree. Take down other bikes.
A demake of the classic ZX Spectrum game Deathchase (1983). A game in 1024 Compressed Bytes of code for PICO-1K Jam 2022 #Pico1k
Code:
_set_fps(60)for i=0,511do v=ord("###k#######πΉ##πΊ%>0πΊπΉ##k+π¨π¬πΊπΉ##k+π°π¬[s#πΊs%π°π¬+s#qs+>0=q#ss+π¨0qm#ks+π¨0kπ°#qs%π¨0#π¬#q=#π«0>π―#ss#π«0π¨π°#ss#π¬'eππΊs+#π¬'eπ¬πΊs##π¬'oπ¬k+##π¬'π΅π¬k%##",i\4+1)-35sset(i%32,i\32,({0,12,6})[v\3^(i%4)%3+1])end ::r::n=0s=0l=6::s::x=64y=0z=n/10+1.3 w={}r={}p={}for i=1,99do q={}add(p,q)if(i==mid(8,i,64))for j=rnd(),n/10+2do add(q,rnd(8)\1*16)end end if(l<1)goto r pal(({{12,3,4,11,2},{10,4,9,8,2},{1,2,5,2,1},{15,7,13,6,12}})[n%4+1],1)::_::rectfill(0,0,127,31,1)rectfill(0,31,127,127,2)s+=.01y+=z b=btn()e=b\2%2-b%2 x+=z*e if(y\32!=(y-z)\32)add(r,{x=x,y=16,e=4*e}) if(#w<2)add(w,{x=rnd(2)\1*128,e=0}) for i=#p,1,-1do j=(i+y/32)\1%#p+1q=p[j]d=i*32-y%32 if d==mid(8,d,190)then k=32/d b=k*64+24 for o in all(q)do c=(o-x)%128*k for j=-2,2do a=j*k*128+c+64 t=a-k*2v=a+k*2 u=b-k*56 if v>-16and t<144then rect(t-1,u,v+1,b,0)rectfill(t,u,v,b,3) for g=1,9do t=g%4-1if(t>1)t=2-t circ(a+t*k*8,u-g*k*8,k*11+1,0)end for g=1,9do t=g%4-1if(t>1)t=2-t circfill(a+t*k*8,u-g*k*8,k*11,4)end end if(b>116and abs(a-64)<k*9)cls(10)flip()flip()l-=1goto s end end for f in all(r)do if f.y==mid(d-32,d,f.y)then k=32/f.y b=k*64+24 c=(f.x-x)*k+64 circfill(c,b,k*4,6) for o in all(w)do if(max(abs(o.x-c),abs(40-b))<8)del(w,o)del(r,f)s+=10?"\as8c" end end end if 80==mid(d-32,d,80)then for o in all(w)do if(y\32!=(y-z)\32)o.e=rnd(2)\1*2-1 o.x+=o.e-e/2spr(2,o.x-8,32,2,2,o.e<0)end end end end for f in all(r)do f.y+=z*2f.x+=z*f.e if(f.y-y>256)del(r,f) end ?"β₯ "..l,0,0,7 ?"s "..s\1 if(y<128)?"\^wlvl "..n+1,48,56,7 pal(12,0)spr(0,48,113-e,1,2)spr(0,72,113+e,1,2,1)pal(12,12) spr(1,56,113,1,2)spr(1,64,113,1,2,1) if(y>2048)n+=1goto s flip()goto _
Comments
Log in with itch.io to leave a comment.
Very nice job!
Looks nice, and has an engaging risk/reward system of trying to aim at enemies while avoiding obstacles. I never played the original game, but I can see why it would be popular.
I think user-controllable firing would be a nice addition if you could find a way to squeeze it in, but it works okay as is.
Thanks! Adding user-controllable firing doesn't add too much code, but when you're just above 1024 compressed bytes, everything counts, Anyway, I think I'm getting too lazy and going auto-fire in every game from the start, instead of adding it only as last resource to keep within compressed code limits.
You're right, when you play higher levels at high speed, it's better that other bikes stay off-screen so you can focus on planning ahead your movements. It's crazy I just had to tweak tree drawing a bit to keep the framerate at 60 fps without drops to 30 fps.
Brilliant! My fave game on Spectrum, I still play today from tape!
Love that the source code is just there, in type :) Harks back to the golden age.
Thanks! I spent many hours playing this game when I was a kid. The ZX Spectrum 48k was the first computer my father brought home and this was one of the first games I played, so it's also a special game for me. I still have got nice memories from the golden age.