Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

TweetTweetSnakeView game page

snake in under 560 characters of code
Submitted by Emma Juettner — 25 seconds before the deadline
Add to collection

Play game

TweetTweetSnake's itch.io page

How many characters of code did you use?
556

Include your code here, if you'd like to show it off!
s,k,a,r,z={},key,2,math.random,ipairs for i=0,6 do s[i]={x=128+i,y=64}end m,n,d,e=127,64,r(5,235),r(5,131) function TIC()cls(15)pix(d,e,6)for i,v in z(s)do pix(v.x,v.y,6)end for i=#s,1,-1 do if s[i].x==m and s[i].y==n then reset()end end a=k(58)and a~=1 and 0or k(59)and a~=0 and 1or k(60)and a~=3 and 2or k(61)and a~=2 and 3or a for i=#s,1,-1 do s[i]={x=s[i-1].x,y=s[i-1].y}end s[0]={x=m,y=n} if a==0then n=n-1 elseif a==1then n=n+1 elseif a==2then m=m-1 else m=m+1 end if m==d and n==e then s[#s+1]={x=s[#s-1].x-1,y=s[#s-1].y}d,e=r(5,235),r(5,131)end end

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet