In order to remove the previous character from the screen before printing the next
character, type in:
50 print" ";chr$(250)
(This new line 5 0 automatically replaces the previously typed in line 5 0.)
Now type in:
run
FRAME
To improve the movement of the character across the screen, add the following line:
40 .frame
The F R A M E command synchronises the movement of objects on the screen to the
display frame scanning frequency. If that's a bit technical for you,just remember that
the command should be used whenever you want to move characters or graphics
around the screen smoothly.
This program can be further enhanced to improve the movement by adding some
delay loops and by using a different returning character symbol.
Type in:
Lis
t
Now add the following lines to the program:
70 FOR n=1 TO 300: NEXT n
80 FOR x=39 TO 1 STEP -1
90 LOCATE x,20
100 FRAME
110 PRINT CHR$(251);" "
120 NEXT x
130 FOR n=1 TO 300:NEXT n
140 GOTO 20
run
Foundation Course
Chapter 1 Page 57
\