Test your archery skills and learn some fundamental physics at the same time. ARCHER simulates the effects of gravity, angle and velocity on bow-and-arrow trajectory. Type in the program and RUN. Decide how many arrows you wish to shoot (the fewer tries, the higher the score if you hit the target). ARCHER tells you the target distance, which varies from round to round. Then input the angle and velocity you think necessary to hit the target. Angles must fall between 15 and 89 degrees, and velocity between 50 and 99 feet per second. Enter these together; i.e., 5060 for angle of 50 degrees, velocity of 60 fps.
ARCHER next draws your target, and shoots your arrow with a TWANG. It must land within three feet of the target. (On-screen, the numbers represent the target.) In the following example, our assistant editor scored a bullseye.

The computer calculates the yardage you over- or undershot, and lets you try again until you use up your arrows. You can play as many times as you like, and many people can play; ARCHER lists the high scorer as the score to beat before each player’s turn. ARCHER prints the cumulative score at the end of each round. (ARCHER does not list individual scores for rounds; you must subtract previous scores to get separate round totals.)
Variables
G=acceleration of gravity (fps) N=number of arrows chosen D=target distance (yds.) S1=scaled down distance S2=trajectory plot L=loop counter B$=angle, velocity input X=loop counter A=angle (convert to radians) R=arrow travelling distance H=arrow height T1=loop end value K1=factor to plot X-axis K2=factor to plot Y-axis K3=factor to plot Y-axis X=X in plot statement Y=Y in plot statement T=loop counter SCORE=score of round FINAL=final score Z$=response to prompt
1 REM ** ARCHER, COPYRIGHT (C) 1983 BY LAFAYETTE R. BAGLEY. ALL RGHTS RESERVED **
2 REM
3 REM ** INITIALIZE **
6 LET FINAL=0
9 CLS
10 RAND
15 LET G=32.2
20 PRINT "HOW MANY ARROWS DO YOU WANT?"
30 INPUT N
32 LET D=INT (1E2*RND)+50
33 LET S1=98/D
34 LET S2=S1*.5
36 REM ** MAIN LOOP **
40 FOR L=1 TO N
44 GOSUB 1000
45 CLS
50 PRINT "YOUR TARGET IS ";D;" YARDS AWAY"
60 PRINT "ANGLE, VELOCITY (AV)?"
61 INPUT B$
62 IF LEN B$<4 OR LEN B$>4 THEN GOTO 60
63 FOR X=1 TO 4
64 IF CODE B$(X)<28 OR CODE B$(X)>37 THEN GOTO 60
65 NEXT X
66 IF VAL B$(1 TO 2)<15 OR VAL B$(1 TO 2)>89 OR VAL B$(3 TO 4)<50 OR VAL B$(3 TO 4)>99 THEN GOTO 68
67 GOTO 70
68 PRINT "A: 15>=A<=89; V: 50>=V<=99"
69 GOTO 60
70 CLS
75 REM ** CALCULATE DISTANCE, RANGE, AND HEIGHT ARROW WILL TRAVEL **
80 LET A=(VAL B$(1 TO 2))*PI/180
90 LET V=VAL B$(3 TO 4)
110 LET R=V*V*SIN (2*A)/G
120 LET H=(V*SIN A)**2/(2*G)
130 REM ** DRAW FIELD **
210 FOR X=0 TO 63
230 PLOT X,0
240 NEXT X
280 PRINT AT 21,24;D;" YDS"
290 PRINT AT 5,12;"TWANG"
291 GOSUB 1500
293 PRINT AT 5,12;" "
300 REM ** SCALE DOWN VARIBLES **
310 LET T1=2*V*SIN A/G
320 LET K1=S1*V*COS A
330 LET K2=S2*V*SIN A
340 LET K3=G*S2/2
345 REM ** PLOT TRAJECTORY **
350 FOR T=0 TO T1 STEP T1/50
360 LET X=INT ((K1*T+2.5)/2)
370 LET Y=INT ((K2-K3*T)*T+2)
380 IF Y>43 OR Y<0 OR X>63 OR X<0 THEN GOTO 395
390 PLOT X,Y
395 NEXT T
410 PRINT AT 0,12;"KERPLOP"
411 GOSUB 1500
412 PRINT AT 0,12;" "
415 REM ** TEST FOR HIT **
420 IF ABS (R-D)<3 THEN GOTO 514
427 REM ** CHECK FOR OVER OR UNDER AND PRINT RESULTS **
430 IF (R-D)<0 THEN LET T$="UNDERSHOT"
435 IF (R-D)>0 THEN LET T$="OVERSHOT"
436 PRINT "YOU ";T$;" BY ";INT (ABS (R-D)*100)/100;" YDS"
440 PRINT
450 PRINT "YOU HAVE ";N-L;" ARROW(S) LEFT..."
460 NEXT L
470 REM ** OUT OF ARROWS **
497 PRINT "YOU""RE OUT OF ARROWS--SCORE= 0"
498 GOTO 527
500 REM ** CALCULATE SCORE **
514 PRINT AT 5,10;"** HIT **"
515 GOSUB 1000
516 CLS
517 PRINT "YOU USED ";L;" OF YOUR ";N;" ARROWS"
518 PRINT "YOUR SCORE IS: ";
519 LET SCORE=INT (100*(12-L)/(L*N))
520 LET FINAL=FINAL+SCORE
525 PRINT INT FINAL
527 REM ** PLAY AGAIN? **
530 PRINT AT 10,0;" "
531 PRINT AT 10,5;"PLAY AGAIN (Y/N)?"
540 INPUT Z$
550 IF Z$="Y" THEN GOTO 9
560 GOTO 1600
999 REM ** DELAY LOOPS **
1000 FOR Q=1 TO 25
1010 NEXT Q
1020 RETURN
1500 FOR Q=1 TO 15
1510 NEXT Q
1520 RETURN
1600 CLS
1605 REM ** SOMEONE ELSE? **
1610 PRINT AT 21,0;"DOES SOMEONE ELSE WANT TO? (Y/N)"
1620 INPUT Z$
1630 IF Z$="Y" THEN GOTO 1700
1635 REM ** PRINT SCORE-STOP **
1640 PRINT AT 10,7;"FINAL SCORE = ";FINAL
1650 STOP
1660 REM ** PRINT HIGH SCORE -NEXT PERSON PLAYS **
1700 PRINT AT 10,7;"HIGH SCORE = ";FINAL
1710 PRINT AT 11,7;"BEAT THAT... ?"
1714 REM ** BACK TO SQUARE ONE **
1715 GOSUB 1000
1720 RUN
SYNTACTIC SUM: 25818, 8K ROM
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.