sync on sync rate 0 `draw the 'arena' ink rgb(0,255,0),1 box 0,0,639,479 `reset the colours ink rgb(0,0,255),1 `make our blue guy q=5 for v=1 to q circle 10,10,v next v dot 10,10 get image 1,5,5,16,16 `set the colour to red annd make our red guy ink rgb(255,0,0),1 for v=1 to q circle 10,10,v next v dot 10,10 get image 2,5,5,16,16 `get rid of what's extra cls `position our sprites sprite 1,rnd(639)+1,rnd(479)+1,1 sprite 2,rnd(639)+1,rnd(479)+1,2 `change our sync rate to something suitable sync rate 70 `remake our 'arena', and set the colour to blue ink rgb(0,255,0),1 box 0,0,639,479 ink rgb(0,0,255),1 x1#=rnd(639) :`starting x coordinate y1#=rnd(479) :`starting y coordinate o=rnd(2)+1 g=rnd(2)+1 if o=1 then a1=1 else a2=1 if g=1 then b1=1 else b2=1 `===================== `Main Loop `===================== do `===================== REM EVADER `===================== `increase blue guy's X value if a1=1 x1#=x1#+2 if x1#>=639 a2=1 a1=0 endif endif `increase blue guy's Y value if b1=1 y1#=y1#+2 if y1#>=479 b2=1 b1=0 endif endif `decrease blue guy's X value if a2=1 x1#=x1#-2 if x1#<=1 a1=1 a2=0 endif endif `decrease blue guy's Y value if b2=1 y1#=y1#-2 if y1#<=1 b1=1 b2=0 endif endif `position our blue guy sprite 1,x1#,y1#,1 `===================== REM CHASER `===================== c1#=sprite x(1) :`find blue's X d1#=sprite y(1) :`find blue's Y e1#=sprite x(2) :`find red's X f1#=sprite y(2) :`find red's Y rem Inspired by OBese87 a# = curveangle( atanfull(c1#-e1#,d1#-f1#) ,a#, abs((c1#-x#)+(d1#-y#))/5) x# = x# + sin(a#)*2 y# = y# + cos(a#)*2 rem end inspiration xD `position our red guy sprite 2,x#,y#,2 `set the collision to the red guy coll#=sprite collision(2,0) if coll#=1 goto finish endif sync loop finish: delete sprite 1 delete sprite 2 cls print "AHH! RED CAUGHT UP!!" print "Click to end" sync repeat until mouseclick()=1 end