Play game
Zooom!'s itch.io pageCompressed Bytes used
1023
Source Code (OPTIONAL)
function pr(x0,y0,w,h,c)for y=y0,y0+h do
line(flr(64.5+(0.7+y/128*0.3)*(x0-64)),y,flr(64.5+(0.7+y/128*0.3)*(x0-64+w)),y,c)end
end
function new()_sc=0_of=0_c={{l=0,y=104,c=8,p=1,x=64}}_p={}_de=3_pa=0.5end
function _init()for s=0,9do
poke(12865+68*s,28)for i=0,31do
poke2(2*i+12800+68*s,1536*flr(rnd()+0.7)+222+rnd({0,2,4,7,9}))end
poke(12544+4*s,s)poke(12545+4*s,8)poke(12546+4*s,9)end
poke(12544,128)poke(12573,136)for i=0,31do
poke2(2*i+13344,1088+({18,11})[i\16%2+1]+({0,4,7,11})[i\4%4+1])
if i%4==0then
poke2(2*i+13412,(4-i%8\4)*512+396+i%8*5)end
end
music(0)new()_s=1end
function _draw()cls(5)pr(20,0,88,128,0)for i=-1,6do
for j=0,1do
pr(46+32*j,21*i+_of%21,4,16,7)end
end
for c in all(_c)do
pr(c.x-7,c.y-12,14,24,c.c)
for a=0,1do for b=0,1do
pr(c.x-10+a*18,c.y-5+b*12,2,4,6)end
end
pr(c.x-7,c.y-2-10*c.p,14,4,10)
end
for p in all(_p)do
circfill(p.x,p.y,p.s,p.c)end
?"\f7score\n★ ".._sc
if _s>0then
if _s==2then
?"\f9lost"
end
?"\^j0a\f8\#0 use ⬅️➡️ to avoid collisions \n\*5 press any key to play!\*5 "
end
end
function _update60()if _s>0then
_pa-=1/60if _pa<=0and btn()>0then new()_s=0else
return
end
end
if btnp(0)and _c[1].l>=0then
_c[1].l-=1end
if btnp(1)and _c[1].l<=0then
_c[1].l+=1end
_c[1].x+=mid(-6,6,64+32*_c[1].l-_c[1].x)_de-=1/60if _de<0 then
l=flr(rnd(3))
for o=1,2do
add(_c,{x=32+(l+o)%3*32,y=-12,l=(l+o)%3,c=rnd({1,2,3,4,9,12,14}),p=-1})end
_de=1+2/(1+_sc/10)end
i=1while i<=#_p do
_p[i].d-=1/60_p[i].y+=_p[i].dy
if _p[i].d<0then
deli(_p,i)else
i+=1end
end
i=1while i<=#_c do
if i>1then
_c[i].y+=1+_sc/16
if (_c[i].x-_c[1].x)*(_c[i].x-_c[1].x)+(_c[i].y-_c[1].y)*(_c[i].y-_c[1].y)<400then
_s=2end
end
if rnd()<8/60then
add(_p,{x=_c[i].x+rnd(16)-8,y=_c[i].y+_c[i].p*12+_c[i].p*rnd(4),dy=_c[i].p,s=rnd(3)+1,c=rnd(3)+5,d=0.25})end
if _c[i].y>140then
deli(_c,i)_sc+=0.5else
i+=1end
end
_of+=1+_sc/32end
Leave a comment
Log in with itch.io to leave a comment.
Comments
This is cool & fun!
Really neat 3D/voxel-like depth effect.
Also love how (I think) you're generating your own rnd music melody to accompany your baseline - works really quite well.
Nice one! 👍