
In Cannonade you are the commander (choose your own rank) of a squad of six men. You have been given as your next objective the capture of an enemy gun emplacement. Your men must outmaneuver the gun’s handlers. If they are spotted as they are advancing, they may be fired upon. When a man is hit, he cannot return to his base until the gunner is distracted and fires on another target. Should one of your men breach the fortification protecting the emplacement, the gun is silenced and the position is taken.
Since the game program is long, a temporary program is necessary to initialize certain variables so that the program will run in 1K. Enter the program in Listing 1, RUN it, and then delete lines 10 to 120 inclusively by typing the line number and NEWLINE.
Now you can enter the main program (Listing 2). SAVE it as soon as you have finished entering it. Do not RUN it because RUNning will alter the values stored in the variables initialized by the program in Listing 1. To play the game enter GOTO 100.
The prompt will ask you which man you wish to move. Enter a letter from A to F and NEWLINE. The letter on the screen, corresponding to the man you have chosen to advance on the emplacement, will move forward a random distance and may move either up or down one line on the screen. If he is fired upon and hit, the letter will appear in inverse video. It will remain this way until another man is fired upon by the gunners; then the man can return to the base. This is shown by the return of the letter to the left side of the screen. When a man has broken through the line on the right side, the gun has been captured. The number of moves required will then be displayed. To end the game before the gun is captured, press NEWLINE when the prompt calls for a letter. The number of moves made up to this point will be displayed.
The game is relatively short, but, if you want to increase the difficulty and consequently the playing time, decrement the values which determine the distance moved by changing line 420.
In order to replay the game, you must reload the program from the tape because of the method by which the variables were initialized.
Listing 1.
10 LET T = 4
20 LET D = 0
30 LET X = 0
40 DIM L(20)
50 DIM M(6)
60 DIM P(6)
70 LET L(20) = 2
80 FOR I = 1 TO 6
90 LET P(I) = 1
100 LET M(I) = I
110 IF I > 3 THEN LET M(I) = M(I) + 1
120 NEXT I
Listing 2.
100 RANDOMISE
110 CLS
120 FOR I = 1 TO 7
130 FOR K = 1 TO 19
140 LET L(K) = 0
150 NEXT K
160 PRINT I;" ";
170 FOR J = 1 TO 6
180 IF NOT M(J) = I THEN GO TO 240
190 IF L(P(J)) = 0 OR L(P(J)) = 2 THEN GO TO 220
200 LET P(J) = P(J) + 1
210 GO TO 190
220 LET L(P(J)) = J + 37
230 IF D = J THEN LET L(P(J)) = J + 165
240 NEXT J
250 FOR K = 1 TO 20
260 PRINT CHR$(L(K));
270 NEXT K
280 LET L(20) = 2
290 IF NOT T = I THEN GO TO 310
300 PRINT "SEE NOTE AT RIGHT";I; NOTE:
310 PRINT
320 NEXT I PRINT CHARACTERS FOR
330 PRINT LINE 300 ARE:
340 FOR I = 1 TO 6
350 IF P(I) = 20 THEN GO TO 620 1. SHIFTED "G"
360 NEXT I 2. SHIFTED "A"
370 PRINT "MAN:" 3. SHIFTED "D"
380 INPUT A$ 4. SPACE
390 IF A$ = "" THEN GO TO 630
400 LET X = X + 1
410 LET Q = CODE(A$) - 37
420 LET P(Q) = P(Q) + RND(5) + 3
430 IF P(Q) > 20 THEN LET P(Q) = 20
440 LET J = RND(3)
450 IF J = 1 THEN GO TO 510
460 IF J = 2 THEN LET K = -1
470 IF J = 3 THEN LET K = 1
480 LET I = M(Q)
490 IF I + K = 0 OR I + K = 8 THEN GO TO 440
500 LET M(Q) = I + K
510 IF RND(3) = 2 THEN GO TO 100
520 LET P(D) = 1
530 LET D = 0
540 LET K = 0
550 FOR I = 1 TO 6
560 IF P(I) < K OR D = I THEN GO TO 600
570 LET K = P(I)
580 LET D = I
590 LET T = M(I)
600 NEXT I
610 GO TO 100
620 PRINT "GUN CAPTURED IN ";
630 PRINT X;" MOVES."
Source Code
10 REM *CANNONADE SYNC 1-5 PAGE 32
20 LET T=4
30 LET D=0
40 LET X=0
50 DIM L(20)
60 DIM M(6)
70 DIM P(6)
80 LET L(20)=2
90 FOR I=1 TO 6
100 LET P(I)=1
110 LET M(I)=1
120 IF I>3 THEN LET M(I)=M(I)+1
130 NEXT I
140 RANDOMIZE
150 CLS
160 FOR I=1 TO 7
170 FOR K=1 TO 19
180 LET L(K)=0
190 NEXT K
200 PRINT I;" ";
210 FOR J=1 TO 6
220 IF NOT M(J)=I THEN GO TO 280
230 IF L(P(J))=0 OR L(P(J))=2 THEN GO TO 260
240 LET P(J)=P(J)+1
250 GO TO 230
260 LET L(P(J))=J+37
270 IF D=J THEN LET L(P(J))=J+165
280 NEXT J
290 FOR K=1 TO 20
300 PRINT CHR$ (L(K));
310 NEXT K
320 LET L(20)=2
330 IF NOT T=I THEN GO TO 350
340 PRINT "\''#\.. ";I;
350 PRINT
360 NEXT I
370 PRINT
380 FOR I=1 TO 6
390 IF P(1)=20 THEN GO TO 660
400 NEXT I
410 PRINT "MAN:"
420 INPUT A$
430 IF A$="" THEN GO TO 670
440 LET X=X+1
450 LET Q= CODE (A$)-37
460 LET P(Q)=P(Q)+ RND*5+3
470 IF P(Q)>20 THEN LET P(Q)=20
480 LET J= RND*3
490 IF J=1 THEN GO TO 550
500 IF J=2 THEN LET K=-1
510 IF J=3 THEN LET K=1
520 LET I=M(Q)
530 IF I+K=0 OR I+K=8 THEN GO TO 480
540 LET M(Q)=I+K
550 IF RND*3=2 THEN GO TO 140
560 LET P(D)=1
570 LET D=0
580 LET J= RND*3
590 FOR I=1 TO 6
600 IF P(1)<K OR D=I THEN GO TO 640
610 LET K=P(I)
620 LET D=I
630 LET T=M(I)
640 NEXT I
650 GO TO 140
660 PRINT "GUN CAPTURED IN ";
670 PRINT X;" MOVES."
680 STOP Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.