Catch the red guy if you can
Try to catch the red guy if you can! Only the spot light can reveal where's the red guy. Your score will count how many times you catch him in one minute.
A game in 558 characters of code for TweetTweetJam 5
This game was made for #TweetTweetJam and contains only 558 characters of code, including art. The code is below:
z,w,f,m,g,h=mid,rnd,122,64,24414,0pal({1,13,7,13,8},1)::s::x,y,s,t,p=m,m,0,60,{}for i=1,m do p[i]={x=w(f),y=w(f),a=w(),t=10}end::_::cls(c)t-=1/30 c,b=0,btn()x+=(b&2)/2-(b&1)y+=(b&8)/8-(b&4)/4x,y=z(x,127),z(y,127)poke(g,255)circfill(x,y,32,1)poke(g,238)for i=1,m do q=p[i]u,v=q.x+cos(q.a),q.y+sin(q.a)q.t-=1 if(q.t<0)q.a,q.t=w(),w(m) if u==z(u,f)and z(v,f)==v then q.x,q.y=u,v else q.a=w()end ?"웃",q.x,q.y,i<2and 4or 2 end if(pget(x,y)>3)s+=1 c,q=1,p[1]q.x,q.y=w(f),w(f) if(t<0)goto s ?"s:"..s.." h:"..h.." ⧗:"..flr(t),4,4,10 pset(x,y,8)h=max(s,h)flip()goto _
Comments
Log in with itch.io to leave a comment.
Love this! I've gotten to 8 in a run. Is the flash showing the new guy after catching him intentional?
The full screen flash was intentional, to let you know you successfully caught the red guy. But you're right, it also disables the spotlight mask and shows the red guy new position for one frame. Too fast for my eyes to notice, I suppose. If I had to code this game again, I would remove the flashing, as it's a bit unpleasant for the eyes.
The spotlight effect is neat, I like how the red person just looks like all the others in the dark. Wish I was good enough to clear the screen of all the people.
The red person running the same speed as the player makes catching them very difficult. I don't think they have ai, but they sure do love to turn and run from me.
Sorry, you can't clear the screen: when you catch the red guy, it's not removed but its position is randomized instead. Don't ask me why I took this approach, I suppose it made sense at that moment.
Tip: you can move faster than the red guy when moving in diagonal due to 8-way movement not being perfect. They all move in a straight line but take a new random heading after a random distance or at screen bounds. So there's no real AI. I was amazed to see that a similar logic worked so well in another entry.
There are so many that I didn't notice that it was randomized. Lucky I didn't try to clear the screen for that long then. I noticed the diagonal, but it was hard to get them to run in a direction where that was useful.
This is hottt!