1K Bomberguy #Pico1k

A bomberman demake in 1024 Compressed Bytes of code for PICO-1K Jam 2023 #Pico1k
Code:
poke(24405,0)cls()?"\fc\^:3c5a7e187e183c66\fd\^:ee0eeee0ee0eeee0\ff\^:007e5a66665a7e00\f8\^:30081c363a3e1c00\fa\^:0055aa0000aa5500\fa\^:2442244224422442"
poke(24405,96)_set_fps(60)h=0function f(x,y,d,c,m,b,u,v)while d>=0and(c<1or c>3)do
c=mget(x\8,y\8)mset(x\8,y\8,m and((c==2or c>3)and 0or c)or((c==0or c>=3)and b or c))x+=u y+=v d-=1end
end::r::l=1s=0j=6e=0t=1::s::o={x=60,y=68,z=0,u=0,v=0,l=1,c=0,m=8}p={o}r=2srand(l)for i=0,224do
a=i%15b=i\15mset(a,b+1,(a==0or b==0or a==14or b==14or(a%2<1and b%2<1))and 1or(rnd(5)<1and((a!=7and b!=7)and 2or 0))or 0)end
for i=0,l\3+2do
add(p,{x=12+rnd(13)\1*8,y=20+rnd(13)\1*8,z=0,u=0,v=0,l=1,c=1,m=12,r=0})end::_::cls(1)map()?"s "..s.." h "..h.." \f8♥ "..j,3
for q in all(p)do
if(q.c<1)spr(0,q.x-4,q.y-4)
if(q.c==1)?"🐱",q.x-3,q.y-2,11
if t<0then
if q.c<3then
if q.z<1then
if q.c<1then
q.b=btn()else
q.r-=1if(q.r<0)q.r=3q.b=1<<(rnd(4)\1)end
q.u=q.b\2%2-q.b%2q.v=q.b\8%2-q.b\4%2if(q.u!=0)q.v=0
c=mget(q.x\8+q.u,q.y\8+q.v)if((q.u|q.v)!=0and(c<1or c>3))q.z=q.m
if mget(q.x\8,q.y\8)>3then
if q.c>0then
s+=1h=max(h,s)del(p,q)else
e=2t=1end
end
end
if(q.z>0)q.x+=q.u/q.m*8q.y+=q.v/q.m*8q.z-=1
if q.c<1then
if(btnp(4)and r>0and mget(q.x\8,q.y\8)<1)w={x=q.x\8*8+4,y=q.y\8*8+4,l=120,c=3}add(p,w)mset(q.x\8,q.y\8,3)r-=1
else
if(max(abs(q.x-o.x),abs(q.y-o.y))<4)e=2t=1
end
end
if(q.c>2)q.l-=1
if(q.c==3and mget(q.x\8,q.y\8)>3)q.l=0
if q.l<=0then
mset(q.x\8,q.y\8,0)if(q.c==4)f(q.x,q.y,3,0,1,0,8,0)f(q.x,q.y,3,0,1,0,-8,0)f(q.x,q.y,3,0,1,0,0,8)f(q.x,q.y,3,0,1,0,0,-8)r+=1del(p,q)
if(q.c==3)q.c=4q.l=60
else
if(q.c==4)f(q.x,q.y,3,0,nil,4,8,0)f(q.x,q.y,3,0,nil,4,-8,0)f(q.x,q.y,3,0,nil,5,0,8)f(q.x,q.y,3,0,nil,5,0,-8)
end
if(#p==1)e=1t=1
else
t-=.002a="lvl "..l
if(e==1)a="nice"
if(e==2)a="ouch"
if(e==3)a="game over"
?"\^t\^w"..a,64-#a*4,60,7
if t<0then
?"\ae"
if(e==1)l+=1e=0t=1goto s
if(e==3)goto r
if e==2then
j-=1if(j>0)e=0t=1goto s
e=3t=1end
end
end
end
flip()goto _


Comments
Log in with itch.io to leave a comment.
Really nice demake of Bomberman considering the wild constraints!
Thanks!!! Too bad the random level generator screws up so often.
Bomberman was on my list of things to try.
Seeing your version makes me realize the complexity of the task 😧
… I’m so curious, and liked BomberMan so much, that I think I won’t be able to resist having a go.
Ooh very nice 1K entry!
Thanks! I thought it would be cool to go back to the classic games in 1K.