Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

1K DefenderView game page

Submitted by ggaughan — 1 day, 19 hours before the deadline
Add to collection

Play game

1K Defender's itch.io page

Compressed Bytes used
1023

Source Code (OPTIONAL)
z=0::a::srand(1984)s={"\^:000002063e7e0000","\^:000040607c7e0000"}x=60f=1fd=0l={}m={}b="•"w={{5,"☉"},{3,"✽"}}wi=-1h={}vv=0v=125vc=48ww=496p=0y=x
for i=1,ww do add(h,v)v+=i<ww-16and rnd(2)-1or 1end
::d::cls()camera()?p,20,2,12
line(69,0,69,8,1)line(79,0,79,8)line(0,8,128,8)
for n in all(m)do
pset(80+(((-128+n[1]-v+ww/2)%ww-300)\13),n[2]\14,ec+(n[3]==b and 1 or 0))end
camera(48-vc,0)
for i=0,128do
pset(i,h[(1+(v+i)%ww)\1],4)end
if wi==nil then?"🅾️",x,y,8
if(p>=z)z=p?"★",x,y-8,10
if(btnp(🅾️))goto a
else
if#m==0then
wi+=1ec=11+wi%5?"\ai4bg"
for i in all(w)do
for n=1,i[1]*mid(1,wi,3)do
add(m,{rnd()*ww,-8,i[2],rnd(2)-1,rnd(2)-1,2^14})end
end
end
for n in all(m)do
n1=(n[1]-v)%ww-48?n[3],n1,n[2],ec
n[2]+=n[5]n[1]+=n[4]n[1]=n[1]%ww
if(n[2]>108)n[5]=-rnd()
if(n[2]<10)n[5]=rnd()
if n[3]!=b and rnd()>.999-wi/100and abs(x-((n[1]-v)%ww-48))<32 then
add(m,{n[1],n[2],b,rnd(4)-2,rnd(4)-2,t()})?"\ai4g"
end
if(t()-n[6]>3)del(m,n)end
for i=1,5do
for j=1,3do
if(pget(x+i,y-4+j)==ec)wi=nil?"\ai6s8a"
end
end?s[f>0and 1or 2],x,y-5,7
for k in all(l)do
kx=k[1]+k[3]k2=k[2]xt=k[1]-kx
for n in all(m)do
n1=(n[1]-v)%ww-48r=n1+5tl,tr,tt,tb=(n1-kx)/xt,(r-kx)/xt,n[2]-k2,n[2]+5-k2
c=max(max(min(tl,tr),min(tt,tb)))<min(1,min(max(tl,tr),max(tt,tb)))
if(c)del(m,n)p+=10cr=1cy=n[2]cx=n1?"\ax6g"
end
if cr then circ(cx,cy,cr,10)cr+=1
if(cr>12)cr=nil
end
line(kx,k2,k[1],k2,7+rnd(4))k[1]+=k[3]/4
if(k[1]>138or k[1]<-10)del(l,k)end
if(btnp(❎))add(l,{x+max(f,f*8),y,f*16})?"\ai1x3ab"
if(btn(⬅️))f=-1fd=-vc+32vv+=f
if(btn(➡️))f=1fd=vc-48vv+=f
if(btn(⬆️))y-=1.5
if(btn(⬇️))y+=1.5
y=mid(12,y,108)vv*=.88v+=vv
x=mid(48,x-f,80)v=v%ww
if(fd>0)fd-=1vc-=f
end?z,108,2,10
flip()goto d

Leave a comment

Log in with itch.io to leave a comment.

Comments

HostSubmitted(+1)

Woah.
Very impressed that you got the basics of defender into just 1K.
Even down to the radar and ever-harder waves of enemies.
Plays and sounds really good.
Very nice entry!