Commodore 16 User Manual
Download Operation & user’s manual of Commodore 16 Desktop for Free or View it Online on All-Guides.com.
this Illusion
on your computer is
lo use a program
lo draw a picture,
wait
for
a
split
second, (ben change
to a
new
picture.
To get the program
to create pictures
you would use the PRINT
statement with the graphic
characters. The
simplest type of animation
involves alternating
two characters
to gel the effect of
movement,
This
program
sim
ulates
animation
by
alternating
ihe circle
(
shift
& O)
and heart
(JHfBt & S)
symbols.
It
you use your
imagination,
you could
consider this
a heartbeat ol
sorts
IMPORTANT
TO NOTE: Each time
SOFT
or
O
is referred
to, il
should
be typed
at the SAME TIME
as the key
following
it when
entering the
program, since
nolhtng happens when
either Is
typed by
Itself
Remember lo
type NEW and press
mft
before entering
each new
program, and
press
KTUBK to
enter
each line In all these
programs
10 PRINT
"HOME SHOT
20FOHL=1TO
100
30 NEXT
L
40 PRINT
"
HOME
SHIFT
50 FOR
M=l TO 200
60 NEXT
M
70 GOTO 10
type these
keya
simultaneously
You'll
see Ihe obvious limitation
of animation alternating
two characters
when
you RUN this program To
stop it press Ihe
boh/stop
key
To
gel a
more interesting
effect
you can build a small picture from
several graphic characters,
then change
a
few
ol the characters while
leaving
others in the same
pace This gives
the
elfecl of
part of
a
larger
object
moving,
as In the following
program;
!
I
I
I
I
I
i
II
I
!
I
I
i
(
i l
(
I
I
! I
i
I
I
(
I
I
I
'
I
I
I
I
10
PRINT
"
HOME SHUT
M SHIFT W SHIFT N
"
20 PRINT"
SPACE
O
+ SPACE
30 PRINT
"
SHIFT N SPACE SHIFT M
"
40
FOR L= 1 TO 300: NEXT L
SO PRINT
"
HOME SPACE SHIFT W
60 PRINT
"
O
T
C>
+
<
T
"
70 PRINT
"
SPACE © G
fr.
G"
80 FOR L= 1 TO 300: NEXT L
90 GOTO 10
Type RUN and
press Betuhn
In bolh examples
of
animation so
far. the figure has
been stationary In
one area
on Ihe
screen. The
next step is lo move
the animated figure
around. The TAB function helps
when
you
want
to
move objects from
the led
edge,
(The TAB function
is explained in
detail
In ihe BASIC
Encyclopedia) The
following program portrays a snake crawling on
Ihe
screen.
Remember lhal ana the
tollowing
key are
slil lyped together.
5FORA=0TO30
10
PRINT
"
SHIFT CUl
"
20 PRINT TAB (A)
"
SHIFT U SHUT
I SHIFT U SHIFT I
"
30 PRINT TAB (A)
"
SHIFT
K SHIFT
I
SHIFT K SHIFT I SHIFT
Q"
40 FOR
L=l TO 100: NEXT L
50 PRINT " SHIFT
CLE
"
60 PRINT TAB (A
+
1)"
SHIFT
I SHIFT U SHUT 1 SHIFT U SWT
W"
70 PRINT TAB (A+l)"
SHUT
I
SHIFT K SHIFT I
SHIFT
K"
80
FOR L=l TO 100: NEXT L
90 NEXT A
Lines
20
and
30
should look like this
when
typed tn:
Lines
60
and 70
will
look like this;
f\J\
vxr
69