12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

164 APPLE II COMPUTER GRAPHICStog<strong>et</strong>her, the scanning routine will som<strong>et</strong>imes decide that the wrong onehas been shot.The other m<strong>et</strong>hod of de<strong>al</strong>ing with extraneous objects is to use both Hi­Res screens. One screen is displayed with <strong>al</strong>l the missiles, targ<strong>et</strong>s and otherjunk on it, while the other has only the missiles and targ<strong>et</strong>s on it, and is notdisplayed. The collision d<strong>et</strong>ect routine can then check the second screenand not even worry about the extra figures! In some applications the extratime needed to process two screens is offs<strong>et</strong> by not having to decide whatyou ran rnto.In Summary ....That about wraps it up. Hopefully this book has shed some light on waysto make Apple <strong>graphics</strong> do what you want them to, and how many of thegames achieve their effects.So now you have it-the tricks of the animation trade. The ideas presentedhere are the most common and effective techniques currently usedwith the APPLE II. Programming person<strong>al</strong> <strong>computer</strong>s is a creative and fastpacedsport. It is limited only by the programmer's imagination, so we canexpect that before too long there will be new, improved m<strong>et</strong>hods-that's(programming) life! However, the animation techniques you have learnedhere will still be usefu l, and the skills gained will help you to understandand implement the new approaches.VocabularyBox m<strong>et</strong>hodCollision flagContact m<strong>et</strong>hodExercises1. Use the table which contains the <strong>apple</strong> shape (from Chapter 1 l/J) toanimate two <strong>apple</strong>s on the screen, each under control of one of thepaddles. (If you do not have paddles, control the <strong>apple</strong>'s movementwith the keyboard.) Write a collision d<strong>et</strong>ect routine using either thebox or contact m<strong>et</strong>hod to d<strong>et</strong>ermine when the two shapes collide.2. Use the program from Chapter 13 (Listing 13-2), which moves thebyte-move line across the screen, and draw the spider shape in itspath. Write a routine to sign<strong>al</strong> when they contact.3. Write a <strong>computer</strong> game and make a million bucks.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!