You've got 5 seconds to get them all and 5 seconds to run away... rinse and repeat.

A game in 553 characters of code for TweetTweetJam 5


This game was made for #TweetTweetJam and contains only 553 characters of code, including art. The code is below:

_set_fps(60)z,f,m,h,s=mid,124,64,0,0::s::x,y,t,p=m,m,0,{}for i=1,50+s/5do
p[i]={x=rnd(f),y=rnd(f)}end::_::cls(1)t+=1/60c=t%10<5and 10or 8rect(0,0,127,127,4)b=btn()x+=(b&2)/2-(b&1)y+=(b&8)/8-(b&4)/4x=z(3,x,f)y=z(3,y,f)for i,q in pairs(p)do
?"●",q.x-3,q.y-2,c
u,v=x-q.x,y-q.y
b=u*u+v*v
if(i%5==3)u/=4
if(i%5==4)v/=4
a=c>8and-.4or.4
a/=(1+b)^.5
if(c>8and b>m*m)a=0
q.x+=a*u
q.y+=a*v
q.x=z(3,q.x,f)q.y=z(3,q.y,f)if b<16 then
if(c<10)s=0goto s
s+=1deli(p,i)end
end
?"웃",x-3,y-2,12
?s.." "..h.."⧗"..flr(6-t%5),2,2,13-t%10
if(#p<1)goto s
h=max(s,h)flip()goto _
StatusReleased
PlatformsHTML5
Rating
Rated 4.5 out of 5 stars
(2 total ratings)
AuthorSkyBerron
GenreAction
Made withPICO-8
TagsPICO-8, tweettweetjam

Comments

Log in with itch.io to leave a comment.

I like this. It's good that the timer is on screen. It encourages me to push my luck in grabbing just a few more before the roles reverse. Me every time they clump up while chasing me then the roles reverse: "You thought you were trapping me, but it was I who was trapping you" then I get a bunch of points.

Thanks, I wanted to add a progress bar style of timer but didn't have the spare chars. Before starting to code, I thought the idea was very easy to implement and could work. The first tests showed that it was very easy to group them and dodge no matter how many they were, as they all took the same path. I tweaked the chasing logic a bit to make it more difficult. But I could not fix that they are slippery to catch in the open unless you take them to the corners. So the strategy for the last seconds of running away is to bring them by the walls and let them come close.