Skip to main content

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

dig dug 1kView game page

Submitted by mhungerford β€” 1 minute, 37 seconds before the deadline
Add to collection

Play game

dig dug 1k's itch.io page

Compressed Bytes used
1023

Source Code (OPTIONAL)
l,v=1,3r=rectfill
function s()
m,e,x,y,d,f,j,k,h={},{},4,28,0,0,0,0,0
for y=-1,16 do m[y]={}for x=-1,16 do m[y][x]=1 end end
for i=1,l+2 do
b,c=flr(rnd(15))*8+4,flr(rnd(11))*8+36
g=rnd()<.5 and{sgn(64-b),0}or{0,sgn(64-c)}
add(e,{t=i%2,a=0,x=b,y=c,d=g[1],f=g[2]})
for j=0,2+rnd(3)do
w,z=b\8+g[1]*j,c\8+g[2]*j
if(w>=0 and w<16 and z>2 and z<15)m[z][w]=nil
end
end
end
s()
::βŒ‚::p=btn()
if(x%8==4 and y%8==4)d=((p&2)\2-(p&1)\1)f=(d==0)and((p&8)\8-(p&4)\4)or 0 j=(d==0 and f==0)and j or d k=(f==0 and d==0)and k or f
x+=d y+=f x,y=mid(4,x,124),mid(28,y,116)m[y\8][x\8]=nil
r(0,0,127,23,1)
for y=24,119,8 do for x=0,127,8 do if(m[y\8][x\8])fillp(0x8050)pal(0,2)r(x,y,x+8,y+8,({1,10,9,8,4})[y\24+1])pal()fillp() end end
for g in all(e)do
if(h>0)g.a+=((j!=0 and y==g.y and abs(x+j*8-g.x)<8) or (k!=0 and x==g.x and abs(y+k*8-g.y)<8))and 4 or 0?"s",x+j*8-2,y+k*8-2,12
g.a=max(g.a-2,0)
?(g.t<1and"πŸ…ΎοΈ\vt\fa\^.\0008TTx\000$γƒ "or"\^.○ツ…ッ○、|エ"),g.x-4,g.y-4,g.a>1 and 7 or 8+g.t*3
if(g.x\8==x\8and g.y\8==y\8)then v-=1x,y=0,0?"\^6"
goto βŒ‚ end
if(g.a>20)del(e,g)
if(g.a>0)goto _
if g.x%8==4 and g.y%8==4 then
a,b=sgn(x-g.x),sgn(y-g.y)n,o=g.x+g.d*8,g.y+g.f*8
c=function(x,y)x,y=x\8,y\8return x>-1and x<16and y>2and y<15and not m[y][x]end
if(g.d==a and g.d!=0and c(n,g.y))or(g.f==b and g.f!=0and c(g.x,o))then
elseif g.d!=0and c(g.x,g.y+b*8)then g.d,g.f=0,b
elseif g.f!=0and c(g.x+a*8,g.y)then g.d,g.f=a,0
elseif not c(n,o)then g.d,g.f=-g.d,-g.f
end
end
g.x,g.y=mid(4,g.x+g.d,124),mid(28,g.y+g.f,116)
::_::end
?"β˜…\^g\f7\^.γ€Œ<BB<~$f",x-4,y-4,12
h=max(0,(p&32>0)and 5or h-1)
if(v==0)s()v,l=3,1?"\^7"
if(#e==0)l+=1s()?"\^7"
flip()?"\^1"
cls()goto βŒ‚

Leave a comment

Log in with itch.io to leave a comment.

Comments

HostSubmitted

What a cool 1K demake of a classic.
You've got all the bases covered here (inc. catchy music!)
Agreed with JadeLombax - was most impressed with your 1.5 mins to spare! πŸ˜…
Congrats for crossing the finish line just in the nick of time πŸ‘

Submitted

Lovely stuff :)