PLAYER/MISSILE......
GRAPHICS
by Joseph Trem
This program demonstrates the use of player/ missile graphics to simulate an animated space creature. By using the first
joystick, you can move the creature around on the screen. Press the joystick button and you have the creature change color!
Here is a thorough breakdown of the program:
Line 10-16 | Draws background |
Line 20 | Sets graphics 8 |
Line 40 | Sets color |
Line 50 | Gets player/missile address |
Line 60 | Stores address in base register |
Line 70 | Enables DMA |
Line 80 | Gets start address |
Line 81-87 | Reads stick (0) & sets speed |
Line 89 | Pokes horizontal position |
Line 90-92 | Pokes vertical position of image one |
Line 94-96 | Pokes vertical position of image two |
Line 97-99 | Pokes vertical position of image three |
To create animation we have inserted a slightly different image into each of the three lines (91, 95, & 98). Notice that lines 90, 92, 94, 96, 97, & 99 ,ire used to erase the picture in the vertical position. If these lines are omitted, you will get some unerased dots on the screen.
In our example, we have used only one type of player. There are actually four players and four missiles that can be defined, or five players and no missiles. Here is some information to demonstrate what to use for different graphics modes and different players. Each player uses a 256 byte location. The vertical position runs from 32 to 223 in graphics 8 and 16 to 111 in graphics 7. The horizontal position runs from 41 to 200 in both graphics modes.
Experiment with different players. Have fun making your own games. And most of all ...
DON'T LET THEM LITTLE INVADERS GET'CHA!