Linebasket
Jump, then throw your ball through the line to get three points!
- Jump with the up arrow key.
- Throw with the right arrow key. This costs one point.
There is no end state to this game, just try to get more points, I guess.
Made with TIC-80 for the TweetTweet 2 game jam!
The code is 476 characters!
Here it is:
- py=50
- pvy=0
- bl={}
- s=9
- h=220
- function TIC()
- if btnp(0) then pvy=-2 end
- if btnp(3) then bl[#bl+1]={x=4,y=py,v=pvy-1}
- s=s-1 end
- if pvy<2 then pvy=pvy+0.04 end
- if py<0 then
- py=0
- pvy=0
- end
- if py>124 and not btnp(0) then
- py=124
- pvy=0
- end
- py=py+pvy
- for i=1,#bl,1 do
- if bl[i].v<2 then bl[i].v=bl[i].v+0.04 end
- lx=bl[i].x
- bl[i].x=lx+2
- ly=bl[i].y
- bl[i].y=ly+bl[i].v
- if lx==h and ly>52 and ly<84 then
- s=s+3
- end
- end
- cls(0)
- rect(4,py,8,12,6)
- for i=1,#bl,1 do
- circ(bl[i].x,bl[i].y,3,9)
- end
- rect(h,52,1,32,5)
- print(s,115,0)
- end
Leave a comment
Log in with itch.io to leave a comment.