
CREATING A SPRITE . . . STEP BY STEP
To make this as easy as possible for you, we've put together this
simple step by step guide to help you draw your own sprites.
STEP 1:
Writethe spritemaking program shown here ON A PIECEOF PAPER.
note that line 100 starts a special DATAsection of your program which
will contain the 63 numbers you need to create your sprite.
~m:mm
10 PR HIT":1" : POKE53;,80, 5 :POKE53281 , 6
20 V=53248:POKEV+34,3
30 POKE53269,4:POKE2042,13
40 FORH=(;H062: READQ:POKE':'32+t.l.. Q :t.jEXT
100 DATA255,255,255
1'211 DATAI28,0..1
102 DATAI28..0.. 1
103 DRTAI28, 0..1
1(14 DATAI44.0.1-
105 Dt1TI"I144..0..1-
106 DATAI44,0,1-
107 DRTI"I144..0, 1-
108 DATAI44,0,1-
109 DATAI44,O,I-
110 DATAI44,Q,1-
111 DATAI44,0,1-
112 DATAI44,0,1-
113 DATAI44..(I, 1-
114 DATAI28, 0..1-
115 DATAI28, 0..1-
116 DATAI28,O,I-
117 DATA128, 0.. 1-
11:3 DATA128..0..1-
119 DATAI28,0,1-
12121DATA255., 255., 255
:2(10 :.<:=200: 'T'=1(1(1: POKE53252.. :":: POKE53253.. 'r'
STEP 2:
Color in the pixels on the spritemaking grid on Page 162 (or use a piece
of graph paper. . . remember, a sprite has 24 squares across and 21
squares down). We suggest you use a pencil and draw lightly so you can
reuse this grid. You can create any image you like, but for our example
we'll draw a simple box.
STEP 3:
look at the first EIGHTpixels. Each column of pixels has a number (128,
64, 32, 16, 8, 4, 2, 1). The special type of addition we are going to
show you is a type of BINARYARITHMETICwhich is used by most com-
PROGRAMMING GRAPHICS 163
2664
32 1
6 6 4
2 , 12864 32 16' 8 4
2 ,
12864 32 '6 6 4 2 ,
Komentáře k této Příručce