[EDIT] Crap! I've mistyped the title...
[/EDIT]
A (very) little game in 6 lines.
Nothing fantastic, though it can be quite addictive if you're a little on the neurotic-obsessive side.
The goal is to keep the ball in the air by clicking on it. I can't go further than 35, but it should be easy to beat...
I'd like to know what you think of it. And if you have some suggestions about what I could put in the 14 lines left, I'd be interested too.
PS: I think I've seen a similar game (in Java, perhaps) on a website somewhere, but I can't remember where; Does anybody know ?
set window on:set window title "Juggler - Keep it in the air!":autocam off:sync on:sync rate 50
ink rgb(255,255,255),0:box 0,0,80,64:c$="DARKBASIC":ink rgb(255,0,0),0:text 0,0,c$:ink rgb(255,128,0),0:text 0,12,c$:ink rgb(0,0,255),0:text 0,24,c$:ink rgb(255,0,255),0:text 0,36,c$:ink rgb(0,255,0),0:text 0,48,c$
get image 1,0,0,80,64:make object plain 999,640,10:position object 999,0,-235,400:make object sphere 1,60:y#=0:texture object 1,1:backdrop on:color backdrop 0:do:inc x#,xd#:inc y#,yd#
if y#<-196:if n>nb:nb=n:endif:n=0:y#=-196:yd#=yd#*-0.66:if abs(yd#)<1:yd#=0:endif:else:if y#>-196:yd#=yd#-0.6:endif:endif:if abs(x#)>290:xd#=xd#*-1:else:xd#=xd#*0.99:if abs(xd#)<0.1:xd#=0:endif:endif
if mouseclick()=1 and clk=0:dsx#=x#-(mousex()-320):dsy#=y#+(mousey()-240):clk=1:if (dsx#*dsx#)+(dsy#*dsy#)<900:inc n:yd#=10:xd#=dsx#/2.0:yrd#=dsy#/-10.0:endif:endif:if mouseclick()=0 then clk=0
position object 1,x#,y#,400:xrotate object 1,wrapvalue(yrd#*abs(xd#)):Fix Object Pivot 1:zrotate object 1,wrapvalue(xd#*-1.00):Fix Object Pivot 1:text 10,10,"Best: "+str$(nb)+" / Current: "+str$(n):sync:loop
Ideas: memories of things which did not occur yet...