Chapter
10
I
BASIC
Keywords
Animation
To perform object animation, follow these steps:
1.
Put the object on the screen using XOR.
2.
Calculate the next position
of
the object.
3.
Put the object on the screen a second time at the previous lo-
cation to remove the previous image.
4.
Repeat Step
1,
putting the object at the next location.
If you do movement this way, the background is not changed. You
can reduce flicker by minimizing the time between Steps
4
and
1
and by ensuring enough time delay between Steps
1
and
3.
If
you are animating more than
1
object, process every object at
the same time,
1
step at
a
time.
If preserving the background is not important, you can perform
animation using the PSET action rather than the
XOR
action.
Leave
a
border around the image as large
or
larger than the
maximum distance the object moves. When you move an object,
this border effectively erases any points. This method may be
faster than the XOR method described before, because only one
PUT is required
to
move an object.
Sample Program
See the GET/Graphics statement.
284