Something like the following should do nicely :D ( use the right arrow key to speed up!
Graphics 640,480 SetBuffer BackBuffer() Global speed# = 0 Global acc# = 0.5 Global speed_scale = 3 Global cut_off = 80 ; no more than 90, as it's a wave, it will decrease after 90 Global x# = 100 Global y# = 200 While Not KeyHit(1) Cls If KeyDown(205) Then speed = speed + acc If speed > cut_off Then speed = cut_off End If Else speed = speed - acc If speed < 0 Then speed = 0 End If x = x + Sin(speed) * speed_scale If x > 640 Then x = 0 Oval x,y,20,20 Flip Wend End