_TITLE "Flying or Driving Example by Ken G. - Use the arrow keys and Esc to quit." speed = 5
go:
DIM x
(200), y
(200), s
(200) DIM xx
(200), yy
(200), ss
(200) s(r) = (y(r) / 20) * 1.3
ss(r) = (yy(r) / 50) * 1.3
LINE (xx
(r
), yy
(r
))-(xx
(r
) + ss
(r
), yy
(r
) + ss
(r
)), _RGB32(0, c2
(r
), c3
(r
)), B
IF speed
< -20 THEN speed
= -20 x(r) = x(r) + .01 * (x(r) - 400)
y(r) = y(r) + 50 * speed / (601 - y(r))
s(r) = (y(r) / 100) * 1.3
xx(r) = xx(r) + .01 * (xx(r) - 400)
yy(r) = yy(r) + 50 * speed / (601 - yy(r))
ss(r) = (yy(r) / 50) * 1.3
LINE (xx
(r
), yy
(r
))-(xx
(r
) + ss
(r
), yy
(r
) + ss
(r
)), _RGB32(0, c2
(r
), c3
(r
)), B
newrockleft:
x(r) = 0
newrockright:
x(r) = 800
newrocktop:
y(r) = 330
newrockbottom:
y(r) = 600
newbuildleft:
xx(r) = 0
newbuildright:
xx(r) = 800
newbuildtop:
yy(r) = 330
newbuildbottom:
yy(r) = 600