A small game in under 500 lines of code for TweetJam11!

Control the line segment and collect green circles while avoiding the red circles! You only control the circled end point, and it swaps every second!

Controls

Use arrow keys to move one end of the line segment.

Background

Coming up with an idea small enough to even consider making it this small was an interesting challenge! And the minification of this was really hard to do, and took a lot of critical thinking (and looking at other tweet carts out there for inspiration). Every few characters removed felt like a win! It's like a puzzle but you don't know if there's a solution or not! Lots of changes went Ito it during the shrinking process, although I do have my original code, so I may clean it up to include here too, since obviously the below is pretty unintelligible.

Also, with how small the code of this is, there is no error checking on where the new circles spawn, so if one spawns on top of your line, I am sorry :)

In the end, got it down to 486 characters:

u,s,t,r,w,l,v,x,y,p=0,0,1,9,rnd,abs,128,{40,80},{40,80},{{20,20,3},{99,99,8}}::s::cls(6)
? s
if t<3then for i=0,1 do a=i-.5if(btn(i))x[t]+=a*3
if(btn(i+2))y[t]+=a*3end if(u<0)u,r,t=30,9,3-t else if(u%4==0)r-=1
a,b,c,d=x[1],y[1],x[2],y[2]g,h=c-a,d-b j=g*g+h*h u-=1for i=#p,1,-1do e,f,m=unpack(p[i])z,o=e-a,f-b k=mid(0,1,(z*g+o*h)/j)circ(e,f,3,m)if l(z-k*g)+l(o-k*h)<=5then if(m==8)t=3else add(p,{w(v),w(v),8})p[i]={w(v),w(v),3}s+=1end end line(a,b,c,d,7)circ(x[t],y[t],r)end flip()goto s


Published 3 days ago
StatusReleased
PlatformsHTML5
Authortoaster
GenreAction
Made withPICO-8
TagsArcade, PICO-8
ContentNo generative AI was used

Leave a comment

Log in with itch.io to leave a comment.