Bouncing Balls
Move your robot left/right and avoid the deadly bouncing balls!
https://www.lexaloffle.com/bbs/?tid=37758
This game was made for #TweetTweetJam and contains only 559 characters of code, including art. The code is below:
_set_fps(60)h=0::s::s,m,n=-1,128,64 k,x,y,r,g,t,l,p=.05,64,120,5,0,0,0,{} ::_::cls(1)t+=.02 if t>l then u,v,w=rnd(m),.5,flr(32+rnd(16)) if(rnd()<.5)v=-v o={x=m+n+u,y=k*w*w,e=u,w=w,v=v,r=8,c=#p%8+2}l+=9 s+=1 add(p,o)end u=x if(btn(0))x-=1 if(btn(1))x+=1 x=mid(r,x,m-r-1)g=u-x for i=1,#p do o=p[i]o.x=(o.x+o.v)%(2*m) v=(o.x+o.w-o.e)%(2*o.w)-o.w u=o.x-n v=y-o.y-o.r+k*v*v circfill(u,v,o.r,o.c)w=o.r+r u-=x v-=y-r if(u<w and u*u+v*v<w*w)h=max(s,h)cls(8)flip()goto s line(0,y,m,y,3)circfill(x,y-r,r,10)circfill(x+g,y-14,3,9) ?"s:"..s.." h:"..h,4,4 flip()goto _
Leave a comment
Log in with itch.io to leave a comment.