Play game
rocket thingy's itch.io pageCompressed Bytes used
892
Source Code (OPTIONAL)
s='w'
m,o={30},{}
f,b,g,r=flr(rnd()*8),flr(rnd()*7)+9,rnd()/10,rnd()*.2+.75
menuitem(1,'change colors',function()
f,b=flr(rnd()*8),flr(rnd()*7)+9
end)
px,py,vx,vy=0,50,0,0
fl,mn,pl,om,tr=100,0,0,0,0
function _update()
if s=='w'then
if py<-1000then
s='e'
end
vx*=r
vy-=g
h=nil
if fl>0then
if btn(➡️)then
vx+=.4
fl-=.1
elseif btn(⬅️)then
vx-=.4
fl-=.1
end
if btn(⬆️)then
vy+=.4
fl-=.5
?"\ai6d"
end
if btnp(❎)then
for x=-10,10do
local ox=x+flr(px)+64
if o[ox]then
h=x
if o[ox]==13then
fl=min(100,fl+rnd()*60)
elseif o[ox]==9then
mn+=flr(rnd()*40)
elseif o[ox]<0then
pl+=1
end
om+=1
o[ox]=nil
?"\ai2d#"
break
end
end
end
end
px+=vx
for x=-10,10do
local ox=x+flr(px)+64
if m[ox]and m[ox]>=(120-py)-vy then
vy=m[ox]-(120-py)
fl-=0.1
end
end
py-=vy
cls(b)
for x=(vx>=0and 1or 128),(vx<0and 1or 128),(vx>=0 and 1or-1) do
local ox=x+flr(px)
if not m[ox] then
tr+=1
l=m[ox+1]or m[ox-1]
if l then
m[ox]=l+(rnd()*5-(l>100and 5 or l>5 and 2.5or 0))
if rnd()<.0005 then
o[ox]=-1
elseif rnd()<.001 then
o[ox]=9
elseif rnd()<.005 then
o[ox]=13
end
end
end
if m[ox] then
line(x-1,127,x-1,127-m[ox],f)
if o[ox] then
if o[ox]>0 then
pset(x-1,137-m[ox],o[ox])
else
?chr(flr(rnd()*64+64))..chr(flr(rnd()*64+64))..chr(flr(rnd()*64+64)),x-4,100-m[ox],f+1
?"😐"
end
end
pset(x-1,127-m[ox],f+1)
end
end
?flr(fl).."%",1,1
?"$"..mn
?"❎mine"
?"★",60-vx,py
if h then
line(64,py,64+h,127-(m[h+flr(px)]or 20))
end
if vy>.5or abs(vx)>.6 then
?"▒",60-vx*3,py+vy
?"░",60-vx*4,py+vy*3
end
if fl<15and f>1then
?"\ai0g#"
end
elseif s=='e'then
cls()
?"\^jbayou win !",f+1
?om.." ore mined"
?pl.." people saved"
?tr.." terrain explored"
?mn.." money"
sc=om*20+
pl*250+
tr/100+
mn*5
?"total score: "..flr(sc)
end
end
Leave a comment
Log in with itch.io to leave a comment.
Comments
Was surprised how much gameplay you squeezed in.
(The ability to change colours was a fun addition)
Nice one!