Log In  

Cart #focus_ttj7-0 | 2021-11-17 | Code ▽ | Embed ▽ | No License
1

Pretty happy with how this turned out. Managed to implement everything I wanted to within the limitations.

Character count: 560 (558 in-editor)

cartdata("focus_ttj7")d=1/16f=rectfill
h=dget(1)l=0m=127p=66t=0v=0y=62cls()?"move:⬆️/⬇️",p,p,7
::_::t+=d
if(t==0or l>0)v=l>0and"hit the red"or"won"goto u
f(0,y,3,y-3,0)
if(btn(2))y-=1
if(btn(3))y+=1
if(y>m)y=m
if(y<0)y=0
for i=1,m do
for j=0,m do
pset(i-1,j,pget(i,j))end
end
for i=0,3do
for j=0,3do
if(pget(i,y-j)>7)l=1end
end
p+=flr(rnd(9/4)-5/8)if(p>m)p=m-1
if(p<11)p=12
f(m,-1,m,m+1,8)f(m,p,m,p-11,0)f(0,y,3,y-3,7)flip()goto _::u::?"you "..v.."!\n\nscore: "..t.."\nhigh score: "..h,1,1,7
if((t>h and h>0)or(t<d and h>t))dset(1,t)?"new record!"
flip()goto u
P#100290 2021-11-17 20:04


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 11:44:11 | 0.026s | Q:14