A simple ball bouncing game made in under 560 characters.


cartdata("paddle")p=dget(0,p)d=1c=btn

function v()r=rnd(-1)e=0w=64x=32y=0a=w

f=1g=1l=128s=w

if(r<0)d=-1

end

v()::b::flip()cls(1)for i=0,l do circ(8*i%l+sin(x/256)*i/2,8*i%l,(r*i)%l,5)end

if(c(0)and x>0)x-=2*g

if(c(1)and x<l-w)x+=2*g

a+=d*g

s+=f*g

if(a+4>l or a-4<0)d=-d ?"\ab"

if(s+4>l)f=-f ?"\ac"

if(s<0)v()

if(a+4>x and a-4<x+w and y+12>s and y<s)s=y+12f=-f e+=1y+=1w-=.5g+=.1 ?"\ad"

if(y>l)y=0g=1p+=l

if(g>5)g=5

if(w<32)w=32

if(e>p)p=e dset(0,p)

rectfill(x,y,w+x,8+y,9)circfill(a,s,4)

?e,x+w/2,y+2,5

?"hiscore "..p,0,l-16,9

?"by yopenatal",0,l-6

goto b


Leave a comment

Log in with itch.io to leave a comment.