Play game
1kWorms's itch.io pageCompressed Bytes used
1011
Source Code (OPTIONAL)
function tgo(p)
if(n<p)while(1)?"gameover\nSCORE:"..S,o-36,y-24,12
end
function u(y)return(x>0and x<m and t[x]<=y)
end
L,S,N,n=0,0,0,0
::s::
S+=n
L+=1D=8*L+47n=8*L+12P={t=0,s=0}X=32x=1y=64a=0d={}g=0h=360m=512p=0r=8t={}o=0z=0rv=0as=0ps=0e=0f,b=flr,btn
for i=1,m do
y+=rnd({-2,-1,0,1,2})add(t,y)
if(i%D==0)d[i\8]=1e+=1
end
repeat
if b(4) then
p+=.1p%=5
?"\ai6v"..ceil(p).."c"
elseif ps>0 then
o,z=x,y
g=1n-=5as=a
tgo(-6)
rv=p
i=0p=0
?"\ai6v3ccc"
end
if(b(2))a+=2
if(b(3))a-=2
if(b(0)and x>1)x-=1
bb=b(1)and b(5)
if bb then
X+=1
else
if(b(1)and n>0)x+=1n-=1
X=x
end
if g==1 then
o+=cos(as/h)*rv
z+=sin(as/h)*rv+4.9*i^2i+=.01
?"\av1c"
if (d[o\8]==1 and z>t[f(o)]-10)d[o\8]=0n+=f((o-x)*1.2)g=0e-=1S+=f((o-x)*1.2)P={t=60,s=f((o-x)*1.2)}?"\ai5cde"
if o<0or o>m or z>128 then
g=0S-=5tgo(0)
elseif t[f(o)]and z>t[f(o)] then
g=0S-=5tgo(0)
for _=180,h,1 do
ar=_/h
k,q=f(o+cos(ar)*10),f(z+sin(ar)*10)
if(t[k]and q>t[k])t[k]=q
end
?"\ai6v3ccccc\ai6v2ccc"
end
end
a%=h
if not u(y+1) then
y+=1
elseif u(y) then
for j=y,0,-1 do
if(not u(j))y=j break
end
end
ps=p
cls(1)
for v=0,m-1 do
w=t[v+1]line(v,w,v,m,4)circ(v,w+2,2,5)
if(v%8==0 and d[v\8]==1)rectfill(v,w-8,v+8,w-2,10)
end
if(e<1)N=99goto s
if(g==1)pset(o,z,8)
X=(g>0 and o>x+80) and o-80 or bb and X or x
if (P.t>0) P.t-=1?"+"..P.s,x,y-10,10
if (N>0) N-=1?"nEXT LEVEL !\nsCORE:"..S,x,y-20,12
line(x,y,x+cos(a/h)*r,y+sin(a/h)*r,9)circ(x,y,p*10,6)camera(X-32,y-64)print(n,X-32,y-64)print('level:'..L,X+20,y-64)print('a:'..a,X+76,y-64)flip()
until false
Leave a comment
Log in with itch.io to leave a comment.