EasyManua.ls Logo

Commodore 128 - Adjoining Sprites

Commodore 128
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Now use the MOVSPR command to move it as follows:
MOVSPR 1, 45 # 5
Now you know all about SPRDEF mode. First, create the sprite,
save the sprite data and exit from SPRDEF mode to BASIC. Next
turn on your sprite with the SPRITE command. Move it with the
MOVSPR command. When youre finshed programming, SAVE
your sprite data in a binary file with the BSAVE command as
follows:
BSAVE filename, BO, P3584 TO P4096
When you want to use the sprite data again from disk, load the
previously BSAVEd binary file with the BLOAD command as
follows:
BLOAD filename[, BO, P3584]
The portion in brackets is optional. BLOAD loads data into the
address from which it was saved if the optional portion is not
specified.
Now you know the new methods for creating sprites: 1 ) SSHAPE,
SPRSAV, SPRITE, MOVSPR, 2) SPRDEF MODE. Experiment with
all these methods and master sprite animation.
See Storing Sprite Data in Binary Files later in this section for
more information.
Adjoining Sprites
You have learned how to create, color, turn on and animate a
sprite. An occasion may arise when you want to create a picture
that is too detailed or too large to fit into a single sprite, ln this
case, you can join two or more sprites so the picture is larger and
more detailed than with a single sprite. By joining sprites, each
one can move independently of one another. This gives you
much more control over animation than a single sprite.
This section includes an example using two adjoining sprites.
Here’s the general procedure (algorithm) for writing a program
with two or more adjoining sprites.
6-28

Table of Contents

Other manuals for Commodore 128

Related product manuals