Play game
SUB BUB's itch.io pageCompressed Bytes used
856
Source Code (OPTIONAL)
--sub bub by tally
s=20
y=40
bx=rnd(125)\1
by=rnd(125)\1
ex=rnd(125)\1
ey=rnd(125)\1
cx=rnd(125)\1
cy=rnd(125)\1
dx=rnd(125)\1
dy=rnd(125)\1
fx=rnd(125)\1
fy=rnd(125)\1
gx=rnd(125)\1
gy=rnd(125)\1
counter=1
countdown=150
size=5
start=1
p=10
t=0
function _update()
t+=1
if p==0 then
d=1
end
if d and t==45 then
restart=1
end
if d then
if btn(5) then
d=nil
p=10
counter=1
end
end
if not start and t==45 then
p-=1
t=0
counter+=1
end
if s==150 then
s=-30
elseif s==-30 then
s=150
end
if y>=128 then
y=128
end
if not d then
if btn(1) then
s+=1
end
if btn(0) then
s-=1
end
if btn(3) then
y+=1
end
if btn(2) then
y-=1
end
end
if s>=bx-size and s<=bx+size
and y>=by-size and y<=by+size then
bx=rnd(125)\1
by=rnd(125)\1
p+=1
end
if s>=cx-size and s<=cx+size
and y>=cy-size and y<=cy+size
and counter>=3 then
cx=rnd(125)\1
cy=rnd(125)\1
p+=1
end
if s>=dx-size and s<=dx+size
and y>=dy-size and y<=dy+size
and counter>=7 then
dx=rnd(125)\1
dy=rnd(125)\1
p+=1
end
if s>=ex-size and s<=ex+size
and y>=ey-size and y<=ey+size
and counter>=9 then
ex=rnd(125)\1
ey=rnd(125)\1
p-=2
end
if s>=fx-size and s<=fx+size
and y>=fy-size and y<=fy+size
and counter>=5 then
fx=rnd(125)\1
fy=rnd(125)\1
size=10
p+=1
end
if s>=gx-size and s<=gx+size
and y>=gy-size and y<=gy+size
and counter>=11 then
gx=rnd(125)\1
gy=rnd(125)\1
size=2
p+=1
end
if size==2 or size==10 then
countdown-=1
end
if countdown==0 then
size=5
countdown=150
end
if start and btn(5) then
start=nil
t=0
end
if p>=100 then
win=1
end
end
function _draw()
cls(12)
circfill(64,330,220,1)
circfill(bx,by,2,7)
if counter>=9 then
circfill(ex,ey,2,10)
end
if counter>=3 then
circfill(cx,cy,2,7)
end
if counter>=7 then
circfill(dx,dy,2,7)
end
if counter>=5 then
circfill(fx,fy,2,7)
?"+",fx-1,fy-2,0
end
if counter>=11 then
circfill(gx,gy,2,7)
?"-",gx-1,gy-2,0
end
circfill(s,y-10,1,6)
rectfill(s,y-10,s+1,y,6)
circfill(s,y,size,13)
circfill(s+3,y,size,13)
circfill(s,y,1,6)
?p,1,1,7
?"air",10,1
if d then
cls()
?"you ran out of air",30,60,8
if restart then
?"❎",64,68
end
end
if win then
cls(1)
?"phew our air stores",30,60,11
?"are full to bursting!",30,70
?"nice work johnson.",30,80
end
if start then
cls(1)
?"captain!",15,40,12
?"we're running out of air!",15,50
?"better do something about",15,60,14
?"it, johnson!!",15,70
?"❎",64,80,12
end
end
Leave a comment
Log in with itch.io to leave a comment.
Comments
What a cute (+funny) entry.
The powerups were also quite fun & unexpected
(so much so that I forgot to collect air!)
Nice one 👍