Play game
Juggle Cat's itch.io pageCompressed Bytes used
614
Source Code (OPTIONAL)
cartdata("juggle1k")
l,p,h=-1,64,dget(0)
function _update()
if l==0 and s>h then
h=s
dset(0,s)
end
if l==0 or l==-1then
if(btn(5))p,b,t,s,l=64,{},240,0,5
return
end
if(btn(0))p-=3
if(btn(1))p+=3
if(p>112)p=112
if(p<16)p=16
t+=1
if t==250then
c=7
if(rnd(5)>4)c=8
add(b,{rnd(96)+16,0,0,0,c})
t=0
end
for v in all(b)do
if(l==0)break
v[1]+=v[3]
v[2]+=v[4]
v[4]+=0.075
if v[1]>123or v[1]<4then
v[1]-=v[3]
v[3]=-v[3]
end
if v[2]>128then
if v[5]==7then
l-=1
?"\af1e1d1"
else s+=1end
del(b,v)
end
if abs(v[1]-p)<=16and v[2]>116and v[2]<120then
if v[5]==8then
l-=1
del(b,v)
?"\af1e1d1"
else
?"\ac"
v[4]=-v[4]
s+=1
v[3]=(v[1]-p)/20
end
end
end
end
function _draw()
cls()
rectfill(p-16,120,p+16,123,6)
?"🐱",p-3,123,9
if l==-1then
?"\^w\^t juggle cat",18,48,7
?"press x to begin",34,64,7
return
end
?s,1,1,7
for i=1,l do
?"♥",90+6*i,1,8
end
for v in all(b)do
?"●",v[1],v[2],v[5]
end
if l==0then
?"game over",48,40,8
?[[score: ]]..s..[[
best: ]]..h,48,46,7
?"x: play again",40,68,7
end
end
Leave a comment
Log in with itch.io to leave a comment.
Comments
Such a cool idea (+VERY addictive!)
Only managed about 30 before giving up (for now)
A great entry. 👍