Play game
Tank Keeper's itch.io pageCompressed Bytes used
1024
Source Code (OPTIONAL)
x=504y=40g=0h=0r={0,0,0,5}p=32f=5t=0lt=0c=circfill
for i=0,4095do
mset(i%64,i\64,(rnd()>.55or abs(i%64-32.5)<2and i\64<5)and 128or 128+(rnd()>.9-i/9000and rnd(4)\1*32or 0)+3+i\64*.45)end
mset(x\16,y\16,0)function _draw()sf=1sm=6if(lt>0)lt-=1
if(r[2]>0)sf=2sm=9r[2]-=.003
b=btn()g+=sf*(b\2%2-b%2)h+=sf*(b\8%2-b\4%2)g*=.9h*=.9i=(x+g/5)\16j=(y+h/5)\16if mget(x\16,j)<1then
y+=h/5else
?"\ai6x5v3c"
h=h>0and-sm or sm
lt=4lx=x\16ly=j
mset(x\16,j,max(0,mget(x\16,j)%32-r[4]\5)+mget(x\16,j)\32*32)if mget(x\16,j)%32==0then
?"\as8i6x4v2g4"
r[mget(x\16,j)\32+1]+=1mset(x\16,j,0)end
end
if mget(i,y\16)<1then
x+=g/5else
?"\ai6x5v3g"
g=g>0and-sm or sm
lt=4ly=y\16lx=i
mset(i,y\16,max(0,mget(i,y\16)%32-r[4]\5)+mget(i,y\16)\32*32)if mget(i,y\16)%32==0then
?"\as8i6x4v2d4"
r[mget(i,y\16)\32+1]+=1mset(i,y\16,0)end
end
if f>0and mget(32,p\16)<1and mget(33,p\16)<1then
p+=.15f-=.005end
camera(x-64,y-64)cls(1)c(527,p-18,17,0)cb=r[2]>0and 9+t\6%5or 8c(x\3*3-1,y\3*3,2,cb)c((x+1)\3*3+1,(y+1)\3*3,2,cb)c(x,y-4,3,cb)c(x+g\6,y-4+h\8,2,6)for k=.1,1,.1do
c(514,p-cos(k-p/30%.1)*16-19,4,5+(k+p/30)/.1%2)c(540,p-cos(k-p/30%.1)*16-19,4,5+(k+p/30)/.1%2)end
c(527,p-22,16,3)c(527,p-26,12,11)circ(527,p-28,5,3)
if abs(p-y-18)<28and abs(x-528)<28then
if r[3]>0then
f+=min(r[3],.1)r[3]-=min(r[3],.1)?"\as8c1"
circ(528,p-18,28,8+t%2)end
end
a=x\16b=y\16for i=a-5,a+5do
for j=b-5,b+5do
l=mget(i,j)if l<128and l>0then
for k=0,9do
c(i*16+8+cos(k/9+i/12)*5,j*16+8+sin(k/4+j/9)*5,5,13+l\32*13+((i==lx and j==ly and lt>0)and 1or 0))end
end
if l==0then
for k=0,.9,.25do
o=i+cos(k)u=j+sin(k)mset(o,u,mget(o,u)%128)end
end
end
end
for i=a-5,a+5do
for j=b-5,b+5do
l=mget(i,j)if l<128then
if l>0then
for k=0,9do
c(i*16+8+cos(k/9+i/12)*5,j*16+8+sin(k/4+j/9)*5,4,0)end
if l>32then
for k=0,9do
c(i*16+8+cos(k/9+i/12)*5,j*16+8+sin(k/4+j/9)*5,0,13+l\32*13)end
end
end
else
c(i*16+8,j*16+8,13,0)end
end
end
camera()if p>=1030then
?"victory",50,50,9
if(p\1==1030)?"\as9ceg"
else
t+=1end
?"fuel tank "..max(0,f\.1),74,1,7
?" fuel "..r[3]\.1,1,1,7
?"mining "..r[4]
?t,9
end
Leave a comment
Log in with itch.io to leave a comment.
Comments
No one has posted a comment yet