After seeing https://www.quaxio.com/tron/ I wanted to see the smallest version we can do in PICO-8
Currently 251 characters
I'm absolutely sure we can do even better!
(Yes it is useless, yes that probably the lamest game on earth, but who care? :D)
I wanna try this.
One player mode.
by dw817
cls()rect(0,6,127,127)x,y,a,b,s=64,68,1,0,0 f={-1,0,1,0,0,-1,0,1}::z::pset(x,y)s+=1flip()for i=0,3do if btn(i)then c=i*2+1 a=f[c] b=f[c+1]end end x+=a y+=b if pget(x,y)==0then goto z end print("game over:"..s) |
209-chars !
But I think it can be compressed even further. Is 128x128 >32767 ? If not, this next idea might work.
by dw817
197-chars ! Yeah, baby. :D
cls()rect(0,6,127,127)p,a,s=8768,1,0 f={-1,1,-128,128}::z::x=p%128y=p/128if pget(x,y)>0then print("game over:"..s)stop()end pset(x,y)s+=1flip()for i=0,3 do if btn(i)then a=f[i+1]end end p+=a goto z |
If you don't mind the fact it takes 3-lines instead of 1, here it is at 184-chars.
cls()rect(0,6,127,127)p,a,s=8768,1,0 f={-1,1,-128,128}::z::x=p%128y=p/128 if(pget(x,y)>0)print("game over:"..s)stop() pset(x,y)s+=1flip()for i=0,3 do if(btn(i))a=f[i+1] end p+=a goto z |
[Please log in to post a comment]