Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

1day1kView game page

Pilot a broken ship in 1KB of code.
Submitted by drake_blue (@drake_blue_dev) — 7 days, 45 minutes before the deadline
Add to collection

Play game

1day1k's itch.io page

Compressed Bytes used
1019

Source Code (OPTIONAL)
function h()local d,o=x[n+1][1],x[n+1][2]i+=.002add(a,{d=e+d*4,o=f+o*4,f=60,r=d,a=o})l,t=d*i,o*i end function _update60()if btnp(➡️)then n=(n+1)%4h()end if btnp(⬅️)then n=(n-1)%4h()end e+=l f+=t cls(5)camera(e-63,f-63)palt(0)map(0,0,0,0,128,128)if pget(e+l*2,f+t*2)>2or#o==0then for d=0,240do camera()print("²dᶜagame over\nyour score:"..c,30,56)flip()end run()end fillp()for n=#o,1,-1do local d=o[n]if d.e then circ(d.d,d.o,60-d.e,2)d.e-=2if d.e==0then deli(o,n)end else circfill(d.d,d.o,2,10)end end for d=0,8do circfill(e-l*d,f-t*d,2-d/5,12)end for e=2,0,-1do for n=#a,1,-1do local d=a[n]if pget(d.d,d.o)==10then c+=1for e,n in pairs(o)do if abs(n.d-d.d)<4and abs(n.o-d.o)<4then n.e=60end end end d.f-=1if pget(d.d,d.o)>2or d.f<0then deli(a,n)end d.d+=d.r d.o+=d.a if e==0then line(d.d,d.o,d.d-d.r,d.o-d.a,11)end end end camera()fillp(▤)print("²dᶜascore "..c)end poke(24406,128)poke(24405,0)poke(24374,8)fillp(▤)for d=0,7do rectfill(24,d,24+d,d,8)rectfill(55-d,d,55,d)rectfill(72,7-d,72+d,7-d)rectfill(103-d,7-d,103,7-d)end rectfill(56,0,63,7)rectfill(88,0,95,7)rectfill(104,0,127,7)poke(24405,96)cls()srand(stat(95)+stat(94)+stat(93)+stat(92)+stat(91)+stat(90))a,o={},{}pal(8,rnd{8,11,2,3,6},1)r,d={},{}for n=-2,129do r[n]={}d[n]={}for o=-2,129do d[n][o]=rnd(100)<45and 1or 0r[n][o]=0end end for n=1,4do r,d=d,r for n=-1,128do for o=-1,128do local e=0for d=-1,1do for f=-1,1do if d~=n and f~=o then e+=r[o+f][n+d]end end end local f,r=n-63,o-63d[o][n]=e>4and f*f+r*r>81and 1or 0pset(n,o,d[o][n]*8)end print("²dᶜa1day1k: drake blue\npress ⬅️ ➡️ to fire and turn",0,56)end end local r=32768for n=0,127do for e=0,127do local f=d[n][e]==1and 15or d[n-1][e]*8+d[n+1][e]*2+d[n][e-1]+d[n][e+1]*4poke(r,f)if f>0and f<15and f%3==0and rnd()<.5then add(o,{o=n*8+3,d=e*8+3})end r+=1end end e,f,i,l,t=500,500,.4,.4,.4x={{1,1},{-1,1},{-1,-1},{1,-1}}n,c=0,0

Link to Commented Source Code (OPTIONAL)
https://www.lexaloffle.com/bbs/?pid=117866#p

Leave a comment

Log in with itch.io to leave a comment.

Comments

Developer

Found a bug when fiddling with this and fixed it and removed some redundant code to keep it under the size limit.

Developer

Edit: I found a tiny bug and fixed it (bullets weren't going through explosion circles). Ran it through Shrinko-8 and it saved a byte. Weird. The unminified source code seems to be too large for a PICO-8 Edu URL so I linked to Lexaloffle instead.