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.

158 APPLE II COM PUTER GRAPHICSfigures leads to 100 checks, and three figures may give you 100©! So muchfor that idea.We are going to examine two m<strong>et</strong>hods which both use the blind-man'scane approach. We will fi re a missile at a shape stolen from CROSSFIRE(by J. Sullivan), and as the missile moves, we will continu<strong>al</strong>ly check itspath. The shape table is given below, so take a few minutes now to enterand save it. From BASIC type:CALL -151300 : 02 00 06 00 4A 00 4D 49308 : 49 69 18 DF DB DF DB 07310 : 48 49 69 4D 49 18 DF DB318 : DB DB 07 48 0D 6D 0D 6D320 : 0D D8 DB FB DF DB 48 09328 : 0D 0D 0D 4D 01 D8 DF FB330: DF FB 08 4D 49 4D 49 05338 : 18 DF DB DB DB 07 08 4D340 : 49 49 49 05 D8 FB DB DB348 : DF 00 36 27 0D 36 00 0BSAVE XFSHAPE, A$30,L$53 DGPOKE 232,:POKE 233 ,3HGR :HCOLOR = 3 :SCALE = l :ROT = DRAW 1 AT 2,20DRAW 2 AT 2 50The first shape is our targ<strong>et</strong>. It should look a bit like a spider. The secondshape is the missile, and it should look like this:xxxxxxxWhen you g<strong>et</strong> the table saved correctly, you are ready to animate. Wewill leave the spider <strong>al</strong>one and move the missile back and forth across thebottom of the screen using paddle 0. When the paddle button is pressed,we will move the missile up the screen until we bump into either thespider or the top of the screen. To effect that movement, we will plot anderase the missile, then move up one line and do it again. Befo re eachmovement of the missile, we will check the space it is moving into and seeif there is som<strong>et</strong>hing (the targ<strong>et</strong>) <strong>al</strong>ready there. Instead of checki ng to see ifsom<strong>et</strong>hing hits the targ<strong>et</strong>, we will see if som<strong>et</strong>hing runs into the missile!We will develop the program in two stages. The following commandswill g<strong>et</strong> the basic movement started. You may omit any REM statementsexcept 15© and 50© which are used as entry points for GOTO statements.

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

Saved successfully!

Ooh no, something went wrong!