Sorry, code got changed when I attached it as source code. I'll try it here:
Type OrbAttr
xpos : ypos : xvel : yvel : radius
Endtype
Dim Orb(10) AS OrbAttr : Dim Player(1) AS OrbAttr : Dim Score(2) : hide mouse : sync on : sync rate 20
for n = 1 to 200 : ink rgb(200,200,0), rgb(0,0,0) : center text 320,120,"OOO OOO O O OO OOO OO OO OOO" : center text 320,120 + 1 * n/20, "O O O OO O O O O O O O O O O " : center text 320,120 + 2 * n/20, "O O O O O O O O O O O O O " : center text 320,120 + 3 * n/20, "OOO O O O O O OOO OOO OOOO O OOO OOO" : center text 320,120 + 4 * n/20, "O O O O O O O O O O O O O O O " : center text 320,120 + 5 * n/20, "O O O O OO O O O O O O O O O " : center text 320,120 + 6 * n/20, "O O OOO O O OO O O O O OO OOO" : sync : cls : next n
repeat : ink rgb(255,255,0),rgb(0,0,0) : set cursor 0,150 : center text 320,120, "WELCOME TO RING RAGE" : center text 320,130, "AVOID THE RED RINGS FOR AS LONG AS YOU CAN" : center text 320,140, "GUIDE YOUR GREEN RING WITH THE MOUSE" : center text 320,150, "LEFT CLICK TO BEGIN" : sync : cls : until mouseclick() = 1
Start:
Score(1) = 0 : Player(1).xpos = 600 : Player(1).ypos = 400 : Player(1).radius = 0 : for n = 1 to 10 : Orb(n).radius = 0 : Orb(n).xpos = 0 : Orb(n).ypos = 0 : Orb(n).xvel = n : Orb(n).yvel = 11 - n : next n
do : xmove = mousemovex() : ymove = mousemovey() : move = sqrt((xmove * xmove) + (ymove * ymove)) : if move > 25 : ratio = 25000 / move : xmove = (xmove * ratio) / 1000 : ymove = (ymove * ratio) / 1000 : endif : Player(1).xpos = Player(1).xpos + xmove : Player(1).ypos = Player(1).ypos + ymove
Player(1).radius = Player(1).radius + rnd(2) - 1 : if Player(1).radius < 5 : Player(1).radius = 5 : endif : if Player(1).radius > 25 : Player(1).radius = 25 : endif : if Player(1).xpos < 175 : Player(1).xpos = 175 : endif : if Player(1).xpos > 525 : Player(1).xpos = 525 : endif : if Player(1).ypos < 175 : Player(1).ypos = 175 : endif : if Player(1).ypos > 325 : Player(1).ypos = 325 : endif
for n = 1 to 10 : Orb(n).xpos = Orb(n).xpos + Orb(n).xvel : Orb(n).ypos = Orb(n).ypos + Orb(n).yvel : Orb(n).radius = Orb(n).radius + rnd(2) - 1 : if Orb(n).radius < 5 : Orb(n).radius = 5 : endif : if Orb(n).radius > 25 : Orb(n).radius = 25 : endif
if Orb(n).xpos < 100 : Orb(n).xvel = Orb(n).xvel * -1 : Orb(n).xpos = 100 : endif : if Orb(n).xpos > 600 : Orb(n).xvel = Orb(n).xvel * -1 : Orb(n).xpos = 600 : endif : if Orb(n).ypos < 100 : Orb(n).yvel = Orb(n).yvel * -1 : Orb(n).ypos = 100 : endif : if Orb(n).ypos > 400 : Orb(n).yvel = Orb(n).yvel * -1 : Orb(n).ypos = 400 : endif
if (sqrt(((Orb(n).xpos - Player(1).xpos) * (Orb(n).xpos - Player(1).xpos)) + ((Orb(n).ypos - Player(1).ypos) * (Orb(n).ypos - Player(1).ypos))) < (Orb(n).radius + Player(1).radius)) : if Score(1) > Score(2) : Score(2) = Score(1) : endif : repeat : ink rgb(255,255,0),rgb(0,0,0) : set cursor 0,150
center text 320,120, "NOT AS EASY AS YOU THOUGHT" : if Score(1) = Score(2) : center text 320,130, "WELL DONE YOU GOT " + str$(Score(1)) : else : center text 320,130, "YOUR SCORE WAS ONLY A PATHETIC " + str$(Score(1)) : endif : center text 320,140, "YOUR HIGH SCORE IS " + str$(Score(2))
center text 320,150, "LEFT CLICK TO PLAY AGAIN OR RIGHT CLICK TO EXIT" : if mouseclick() = 2 : end : endif : sync : cls : until mouseclick() = 1 : Goto Start : endif : next n
ink rgb(0,255,0),rgb(0,0,0) : circle Player(1).xpos,Player(1).ypos,Player(1).radius : ink rgb(255,0,0),rgb(0,0,0) : for n = 1 to 10 : circle Orb(n).xpos,Orb(n).ypos,Orb(n).radius : next n : ink rgb(0,0,255),rgb(0,0,0) : line 100,100,100,400 : line 100,400,600,400 : line 600,400,600,100 : line 600,100,100,100
line 175,175,175,325 : line 175,325,525,325 : line 525,325,525,175 : line 525,175,175,175 : Score(1) = Score(1) + 1 : ink rgb(255,255,0),rgb(0,0,0) : text 105,105, "SCORE: " + str$(Score(1)) : text 105,120, "HIGH SCORE: " + str$(Score(2)) : sync : cls : loop
Hope that works
Please post any feeback
it will be greatly appreciated