small snake

arrow keys to move

x to proceed to next level

win/loss ratio is displayed in the upper left corner

for #TweetTweetJam, spring 2020


Code:

::i::
poke(0x5f2c,3)
xs=0
ys=-1
s=0
t=0
::n::
cls(ceil(rnd(6)))
for i=1,5 do
 
 a,b=14+rnd(36),18+rnd(32)
 if (i==1) x=a;y=b
 circfill(b,a,4,0)
 circfill(a,b,12,0)
end
circfill(a,b,0,8)
u=15
::l::
if (btnp(⬅️)and xs!=1) xs=-1;ys=0
if (btnp(➡️)and xs!=-1) xs=1;ys=0
if (btnp(⬆️)and ys!=1) xs=0;ys=-1
if (btnp(⬇️)and ys!=-1) xs=0;ys=1

if (pget(x+xs,y+ys)==8)s+=1;goto w
if (pget(x+xs,y+ys)!=0)t+=1;goto w
if(u>0)u-=1
if(u%2==0)x+=xs;y+=ys

pset(x,y,11)
flip()
goto l
::w::
?s.."w "..t.."l ❎",1,1,0
if (btnp(❎)) goto n
flip()
goto w


StatusReleased
PlatformsHTML5
AuthorBeep Yeah!
Made withPICO-8

Comments

Log in with itch.io to leave a comment.

(+1)

One of the maps ended up with the goal in a bubble that's impossible to get to, but at that point I was just letting it lose to see new maps. 

This one's a really neat twist on snake games

(+3)

Ridiculously difficult!

right you are. i had a slower version but i thought it was too easy. maybe i'll swap it out though.