[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

LINE 90:
NEXTX After the sprite has become one of the 3 different shapes defined by the DATA, only then is it allowed to move across the screen. It will jump 3 X positions at a time (instead of scrolling smoothly one position at a time, which is also possible). STEPping 3 positions at a time makes the mouse "dance" faster across the screen. NEXT X matches the FOR... X position loop in line 50.
LINE 95
END ENDs the program, which occurs when the sprite moves off the screen.
LINE 100-109
DATA The sprite shapes are read from the data numbers, in order. First the 63 numbers which comprise sprite shape 1 are read, then the 63 numbers for sprite shape 2, and then sprite shape 3. This data is permanently read into the 3 memory locations and after it is read into these locations, all the program has to do is point sprite 0 at the 3 memory locations and the sprite automatically takes the shape of the data in those locations. We are pointing the sprite at 3 locations one at a time which produces the "animation" effect. If you want to see how these numbers affect each sprite, try changing the first 3 numbers in LINE 100 to 255, 255, 255. See the section on defining sprite shapes for more information.


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated December 10, 2002.