Commodore 128 System Manual page 130

Hide thumbs Also See for 128:
Table of Contents

Advertisement

• Lines 85 and 87 move the joined sprites across the
screen.
• Line 90 delays the program. This time delay is necessary
for the sprites to complete the two trips across the screen.
If you leave out the delay, the sprites do not have enough
time to move across the screen.
• Lines 92 and 93 position the sprites in the center of the
screen, and prepare the spacecraft to fire the retro
rockets.
• Line 95 propels sprite 1, the space capsule, forward. The
number 10 in line 95 specifies the speed at which the
sprite moves. The speed ranges from 1, which is stop, to
15, which is lightning fast.
• Line 96 moves the expired retro rocket portion of the
spacecraft backwards and off the screen.
• Line 97 is another time delay so the retro rocket, sprite 2,
has time to move off the screen.
• Line 98 turns off sprite 2, once it is off the screen.
• Line 99 is another delay so the capsule can continue to
move across the screen.
• Line 100 returns you to text mode.
Working with adjoining sprites can be more interesting than
working with a single sprite. The main points to remember are: (1)
Make sure you position the SSHAPE coordinates at the correct
locations on the screen, so you save the picture data properly;
and (2) be certain to position the sprite coordinates in the correct
location when you are joining them with the MOVSPR statement.
ln this example, you positioned sprite 2 at a location 24 pixels to
the right of sprite 1.
Once you master the technique of joining two sprites, try more
than two. The more sprites you join, the better the detail and
animation will be in your programs.
The C128 has two additional SPRITE commands, SPRCOLOR
and COLLISION, which are not covered in this chapter. To learn
about these commands, refer to Chapter V, the BASIC 7.0
Encyclopaedia.
6-32

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents