$ filename "t.exe"
'uses rtl32
uses gdip

Screen 640,480,1
SetCaption "BOUNCING"
sys font= LoadFont ("courier",24)

sys x,y,bild,r,g,b

sys ball_x=swidth()/2
sys ball_y=sWidth()/2

sys ball_x_speed = 1
single ball_y_speed = 2.5
sys Radius = 40

R= 255
G= 255
B= 255

while key(27)=0
ClsColor 10,0,200,0
ball_x = ball_x + ball_x_speed
ball_y = ball_y + ball_y_speed

if ball_x = 600 then
   ball_x_speed = ball_x_speed*(-1)
end if
if ball_x = 0 then
   ball_x_speed = ball_x_speed*(-1)
end if
if ball_y = 0 then
   ball_y_speed = ball_y_speed*(-1)
end if
if(ball_y = 440) then
   ball_y_speed = ball_y_speed*(-1)
end if
FillOval ball_x,ball_y,40,40, ARGB 255,255,255,255   
Flip
SetFps 90
wend
Ends