The Travelling Salesman's Problem
Arrow keys to move *
Sell those homes fireproofing before it's too late?!
Made in 560 chars for #TweetTweetJam with the wonderful #pico8
CODE BELOW
e="⌂"o=128x=9b=add
y=9n=9r=rnd
v={}h={}cls(4)p=pset
for i=1,15do
f=o*r()q=o*r()b(h,{f,q})end
l=all::_::rect(x,y,x+6,y+6,4)d=del
?"웃",x,y+1,5
j=btn()y+=(j&8)/8-(j&4)/4x-=(j&1)/1-(j&2)/2
for i in l(h)do
if((i[1]-x)^2+(i[2]-y)^2<9)b(v,i)d(h,i)end
n-=1if(n<0)then
j=o*r()q=o*r()w=r()*15circfill(j,q,w,7)n=w for i in l(h)do
if((i[1]-j)^2+(i[2]-q)^2<2*o)d(h,i)print(e,i[1],i[2])end
end
for g=1,500do
a=o*r()j=o*r()k=pget(a,j)u={10,4,8,9}
if(k==mid(7,k,10))p(a,j,u[k-6])end
for i in l(h)do
?e,i[1],i[2],1
end
for i in l(v)do
?e,i[1],i[2],5
end
?#v,1,1,9
flip()goto _
Status | Released |
Platforms | HTML5 |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | superfluid |
Made with | PICO-8 |
Comments
Log in with itch.io to leave a comment.
Nice! A very clever idea and well done. The fire effects are cool and oddly unsettling.
I'm glad I'm fireproof in this! The way the houses burn is neat and surprising. The first one I noticed burn was one I was about to sell to and it turned to ash before me and my steps wiped them off the earth.
haha that made me laugh;) I agree - the burning houses is def the best thing in this tiny game - took myself by surprise when I first saw that haha