Dale’s Atari 800 Games › Stan Ockers
Motie
By Stan Ockers, in the ACE newsletter of March 1983.
Play MotieThe program’s instructions
Stan didn’t write an article for this one; this is what the program itself shows on the screen.
3 Guardian starships protect the Human Empire from attack by a Motie vessel. If there is only one player the computer moves the Motie ship. Two players alternate using stick #1.
The Guardians can't move downscreen while the Motie vessel can move any direction along the indicated starship lanes. Moves are to adjacent empty positions.
Guardians win if the Motie is trapped (has no legal moves). The Moties win if 15 turns have elapsed, if there is a 3-time repetition of position or if their vessel reaches the lowest position.
The program
The listing, “OCKERS' MOTIE by Stan Ockers”, is on pages 10, 11 of the issue. The game page runs it line by line in an emulated Atari 800, just as typed in.
Where this copy came from: Typed-in copy from Atarimania (Motie.zip), proofread against the March 1983 scan. The program text matched. The typed copy's header had been rearranged into three long lines (10, 15 and 30) with a different layout; it is replaced by Stan's header as printed (lines 110-155), which credits the original game to Mac Oglesby.
Show the listing
110 REM ** MOTIE **
120 REM ** S.O. 2/83 **
130 REM ** FROM GAME BY **
140 REM ** MAC OGLESBY **
150 REM ******************
155 REM ** THIS GAME WILL NOT FIT IN 16K **
160 DIM GM$(11),MM$(11),GN$(38),MN$(55),XP$(11),YP$(11),I$(11),L$(49),W1$(21),W2$(19),I1$(11),I2$(11)
170 REM Gardian offset into moves list
180 RESTORE 190:FOR J=1 TO 11:READ A:GM$(J,J)=CHR$(A):NEXT J
190 DATA 1,5,9,13,17,20,26,29,32,36,38
200 REM Motie offset into moves list
210 RESTORE 220:FOR J=1 TO 11:READ A:MM$(J,J)=CHR$(A):NEXT J
220 DATA 1,5,10,15,20,24,33,37,42,47,52
230 REM Allowable Gardian next moves
240 RESTORE 250:FOR J=1 TO 38:READ A:GN$(J,J)=CHR$(A):NEXT J
250 DATA 1,2,3,11,2,4,5,11,1,3,5,11,2,5,6,11,5,7,11,4,6,7,8,9,11,5,9,11,8,10,11,7,9,10,11,8,10,11
260 REM X positions of moves
270 RESTORE 280:FOR J=1 TO 11:READ A:XP$(J,J)=CHR$(A):NEXT J
280 DATA 20,15,20,25,15,20,25,15,20,25,20
290 REM Y positions of moves
300 RESTORE 310:FOR J=1 TO 11:READ A:YP$(J,J)=CHR$(A):NEXT J
310 DATA 9,7,7,7,5,5,5,3,3,3,1
320 REM Allowable Motie next moves
330 RESTORE 340:FOR J=1 TO 55:READ A:MN$(J,J)=CHR$(A):NEXT J
340 DATA 1,2,3,11,0,2,4,5,11,0,1,3,5,11,0,2,5,6,11,1,5,7,11,1,2,3,4,6,7,8,9,11
350 DATA 3,5,9,11,4,5,8,10,11,5,7,9,10,11,5,6,8,10,11,7,8,9,11
380 REM Warp subroutine #1
390 RESTORE 400:FOR J=1 TO 21:READ A:W1$(J,J)=CHR$(A):NEXT J
400 DATA 104,162,0,172,193,2,189,194,2,157,193,2,232,224,8,144,245,140,200,2,96
410 REM Warp subroutine #2
420 RESTORE 430:FOR J=1 TO 19:READ A:W2$(J,J)=CHR$(A):NEXT J
430 DATA 104,162,7,172,200,2,189,193,2,157,194,2,202,16,247,140,193,2,96
440 REM Lanes
450 L$=" //:\\ .. .. :\\://: .. .. ://:\\: .. .. \\:// "
460 REM Draw warp screen
470 GRAPHICS 10:R=INT(RND(0)*16)*16:RESTORE 480:FOR I=1 TO 8:READ A:POKE 704+I,A+R:NEXT I
480 DATA 2,4,6,8,6,4,2,2
490 Q=1:FOR I=0 TO 38:COLOR Q:X=I:Y=I*2:PLOT X,Y:DRAWTO 79-X,Y:PLOT X,Y+1:DRAWTO 79-X,Y+1:DRAWTO 79-X,190-Y
500 DRAWTO X,190-Y:PLOT 79-X,190-Y+1:DRAWTO X,190-Y+1:DRAWTO X,Y:Q=Q+1:IF Q>8 THEN Q=1
510 NEXT I
520 REM save pointers, lower memory
530 LOSAV=PEEK(560):HISAV=PEEK(561):POKE 106,PEEK(106)-32
540 GOSUB 1960:REM Change character set
550 GOSUB 1190:REM Directions-selections
555 REM I$ holds screen configuration
560 I$="gg#g#######"
570 REM random free position for Motie
580 R=INT(RND(0)*9)+2:IF R=3 THEN 580
590 I$(R+1,R+1)=CHR$(109):MOTN=R
600 CURN=5:LCOL=32:MCOL=182:GCOL=246:BKCOL=9:TURN=0
610 GOSUB 1560:REM draw galactic map
620 REM Choose Guardian move
630 IF STRIG(0)=0 THEN 630
640 GOSUB 1780
650 IF Z<>37 THEN 630
660 GNUM=CURN:POSITION X,Y:? #6;"%&":REM %& are in inverse char. line 660
670 IF STRIG(0)=0 THEN 670
680 MFLAG=1
690 GOSUB 1780:J=0
700 IF Z=165 THEN POSITION X,Y:? #6;"%&":MFLAG=0:GOTO 630
710 IF Z<>35 THEN 690
720 MFLAG=0
730 R=ASC(GM$(GNUM+1))
740 K=ASC(GN$(R+J)):IF K=11 THEN 690
750 IF CURN<>K THEN J=J+1:GOTO 730
760 X=ASC(XP$(GNUM+1)):Y=ASC(YP$(GNUM+1)):POSITION X,Y:? #6;"#$":I$(GNUM+1,GNUM+1)="#"
770 X=ASC(XP$(CURN+1)):Y=ASC(YP$(CURN+1)):POSITION X,Y:? #6;"%&":I$(CURN+1,CURN+1)="g"
780 REM Check for Guardian win
790 POKE 77,0:IF I$="#g##mg#g###" OR I$="###g#gm##g#" OR I$="#######gggm" THEN 1450
800 REM Check for 3rd repetition
810 IF I$<>I2$ THEN REPT=0:GOTO 830
820 REPT=REPT+1:IF REPT=3 THEN 1490
830 I2$=I1$:I1$=I$
840 REM Warp and redraw map
850 GOSUB 1700:GOSUB 1560
860 IF PFLAG=1 THEN GOSUB 1100:GOTO 1030
870 FOR J=1 TO 6:FOR K=15 TO 0 STEP -1:POKE 711,MCOL+K:SOUND 0,230+K,10,10:SOUND 1,240-K,10,10:FOR L=1 TO 3
880 NEXT L:NEXT K:NEXT J:SOUND 0,0,0,0:SOUND 1,0,0,0
890 REM Computer chooses Motie move
900 J=INT(RND(0)*3):R=ASC(MM$(MOTN+1))
910 K=ASC(MN$(R+J)):IF K=11 THEN J=0:GOTO 910
920 IF I$="####gg#m#g#" THEN K=10
930 IF I$="#####ggg#m#" THEN K=10
940 IF I$="#####ggg##m" THEN K=9
950 IF I$="###g#g##gm#" THEN K=10
960 IF I$="#g###g#mg##" THEN K=10
970 IF MOTN=1 AND I$(1,1)="#" THEN K=0
980 IF MOTN=2 AND I$(1,1)="#" THEN K=0
990 IF MOTN=3 AND I$(1,1)="#" THEN K=0
1000 IF I$="######gggm#" THEN K=5
1010 IF I$="####g##mgg#" THEN K=5
1020 X=ASC(XP$(K+1)):Y=ASC(YP$(K+1)):LOCATE X,Y,Z:IF Z<>35 THEN J=J+1:GOTO 910
1030 POSITION X,Y:? #6;"{inv}'({/inv}":X=ASC(XP$(MOTN+1)):Y=ASC(YP$(MOTN+1)):POSITION X,Y:? #6;"#$":REM '( ARE IN INVERSE
1040 I$(MOTN+1,MOTN+1)="#":I$(K+1,K+1)="m":MOTN=K
1050 REM Check for Motie win
1060 IF MOTN=0 THEN GOTO 1490
1070 TURN=TURN+1:IF TURN>14 THEN 1490
1080 POSITION 25,11:? #6;15-TURN;" TURNS LEFT "
1090 GOTO 630
1100 IF STRIG(0)=0 THEN 1100
1110 POSITION 25,11:? #6;" Motie turn":MFLAG=2:CURN=MOTN
1120 GOSUB 1780:J=0
1130 IF Z<>35 THEN 1120
1140 R=ASC(MM$(MOTN+1))
1150 K=ASC(MN$(R+J)):IF K=11 THEN 1120
1160 IF CURN<>K THEN J=J+1:GOTO 1150
1170 RETURN
1180 REM The 'ot' in line 1190 are in inverse
1190 PFLAG=0:GRAPHICS 18:POSITION 7,4:? #6;"M{inv}ot{/inv}Ie":POSITION 2,6:? #6;"SELECT-1 Player ":POSITION 0,8
1200 POSITION 1,8:? #6;"OPTION-instructions":POSITION 7,10:? #6;"START"
1210 FOR J=1 TO 30:NEXT J:POKE 53279,8:IF PEEK(53279)=3 THEN GOTO 1260
1220 IF PEEK(53279)=5 AND PFLAG=0 THEN PFLAG=1:POSITION 9,6:? #6;"2 Players":GOTO 1210
1230 IF PEEK(53279)=5 AND PFLAG=1 THEN PFLAG=0:POSITION 9,6:? #6;"1 Player "
1240 IF PEEK(53279)=6 THEN RETURN
1250 GOTO 1210
1260 GRAPHICS 0:POKE 752,1:? :? :? " 3 Guardian starships protect the"
1270 ? "Human Empire from attack by a Motie"
1280 ? "vessel. If there is only one player"
1290 ? "the computer moves the Motie ship."
1300 ? "Two players alternate using stick #1."
1310 ? :? " The Guardians can't move"
1320 ? "downscreen while the Motie vessel"
1330 ? "can move any direction along the"
1340 ? "indicated starship lanes."
1350 ? "Moves are to adjacent empty positions"
1360 ? :? " Guardians win if the Motie is"
1370 ? "trapped (has no legal moves)."
1380 ? "The Moties win if 15 turns have"
1390 ? "elapsed, if there is a 3-time"
1400 ? "repetition of position or if their"
1410 ? "vessel reaches the lowest position. "
1420 ? :? "PRESS KEY TO START":POKE 764,255
1430 IF PEEK(764)=255 THEN 1430
1440 GOTO 1190
1450 GRAPHICS 18:POSITION 2,2:? #6;"The Motie Vessel":POSITION 5,3:? #6;"CANNOT MOVE"
1460 REM All strings in 1470 in inverse
1470 POSITION 3,5:? #6;"{inv}The Guardians{/inv}":POSITION 5,6:? #6;"{inv}HAVE SAVED{/inv}":POSITION 2,7:? #6;"{inv}the human empire{/inv}"
1480 POKE 764,255:GOTO 1530
1490 FOR J=1 TO 300:NEXT J:GRAPHICS 18:POSITION 5,3:? #6;"THE MOTIES":POSITION 3,4:? #6;"have conquered"
1500 REM 1st and last strings in 1510 in inverse char.
1510 POSITION 3,5:? #6;"{inv}THE GUARDIANS{/inv}":POSITION 2,7:? #6;"THE HUMAN EMPIRE":POSITION 4,8:? #6;"{inv}is doomed!{/inv}"
1520 POSITION 1,10:? #6;"again?-PRESS key":POKE 764,255
1530 IF PEEK(764)=255 THEN 1530
1540 GOTO 550
1550 REM Subroutine to draw galactic map
1560 GRAPHICS 1:POKE 756,CSPAGE:DL=PEEK(560)+PEEK(561)*256:FOR J=DL+7 TO DL+15:POKE J,5:NEXT J
1570 J=J+1:IF PEEK(J)<>65 THEN 1570
1580 FOR K=0 TO 2:POKE DL+20+K,PEEK(J+K):NEXT K
1585 POKE 708,LCOL:POKE 709,86:POKE 710,GCOL:POKE 711,MCOL:POKE 712,BKCOL
1590 POKE 87,0:FOR J=3 TO 7 STEP 2:FOR K=17 TO 24:POSITION K,J:? #6;"+":NEXT K:NEXT J
1600 FOR J=4 TO 6:POSITION 15,J:? #6;")":POSITION 25,J:? #6;")":NEXT J:FOR J=2 TO 8:POSITION 20,J:? #6;")":NEXT J
1610 POSITION 18,4:? #6;",":POSITION 23,4:? #6;"*":POSITION 18,6:? #6;"*":POSITION 23,6:? #6;","
1620 POSITION 18,2:? #6;"*":POSITION 23,2:? #6;",":POSITION 18,8:? #6;",":POSITION 23,8:? #6;"*"
1630 FOR J=1 TO 11:X=ASC(XP$(J)):Y=ASC(YP$(J)):POSITION X,Y:? #6;"#$":NEXT J
1640 POSITION 5,0:? #6;"Motie World":POSITION 5,11:? #6;"Human Empire"
1650 FOR J=1 TO 11
1660 IF I$(J,J)="g" THEN X=ASC(XP$(J)):Y=ASC(YP$(J)):POSITION X,Y:? #6;"%&"
1670 IF I$(J,J)="m" THEN X=ASC(XP$(J)):Y=ASC(YP$(J)):POSITION X,Y:? #6;"{inv}'({/inv}":REM '( ARE IN INVERSE CHAR.
1680 NEXT J:RETURN
1700 GRAPHICS 10:POKE 560,LOSAV:POKE 561,HISAV:W1=ADR(W1$):W2=ADR(W2$)
1710 R=INT(RND(0)*16)*16:RESTORE 480:FOR I=1 TO 8:READ A:POKE 704+I,A+R:NEXT I
1720 FOR J=150 TO 50 STEP -1:A=USR(W1)
1730 GOSUB 1770:NEXT J
1740 FOR J=50 TO 150:K=K+D:A=USR(W2)
1750 GOSUB 1770:NEXT J
1760 SOUND 0,0,0,0:SOUND 1,0,0,0:SOUND 2,0,0,0:RETURN
1770 SOUND 0,J,4,12:SOUND 1,J+2,12,12:SOUND 2,J+4,10,6:RETURN
1775 REM Move cursor subroutine (stick 0)
1780 X=ASC(XP$(CURN+1)):Y=ASC(YP$(CURN+1)):LOCATE X,Y,Z:LOCATE X+1,Y,ZZ:POSITION X,Y:? #6;CHR$(33);CHR$(34)
1790 FOR J=1 TO 20
1800 IF MFLAG=1 THEN SOUND 0,150+J,10,10:SOUND 1,170-J,10,10:NEXT J
1810 POSITION X,Y:? #6;CHR$(Z);CHR$(ZZ)
1820 S=STICK(0)
1830 IF (S=14 AND Y>3) OR (S=14 AND X=20 AND Y=3) THEN Y=Y-2
1840 IF (S=13 AND Y<7) OR (S=13 AND X=20 AND Y=7) THEN Y=Y+2
1850 IF S=11 AND X>15 AND Y>1 AND Y<9 THEN X=X-5
1860 IF S=7 AND X<25 AND Y>1 AND Y<9 THEN X=X+5
1870 FOR J=1 TO 11:IF ASC(XP$(J,J))<>X THEN NEXT J
1880 IF ASC(YP$(J,J))<>Y THEN NEXT J
1890 CURN=J-1
1900 IF STRIG(0)<>0 THEN 1780
1910 SOUND 0,0,0,0:SOUND 1,0,0,0:RETURN
1920 REM ** This subroutine reserves 5 pages **
1930 REM ** at the top of RAM, moves the **
1940 REM ** character set from ROM and changes **
1950 REM ** the characters ! thru , **
1960 DIM MCS$(42):RESTORE 1970:FOR J=1 TO 42:READ A:MCS$(J,J)=CHR$(A):NEXT J
1970 DATA 104,169,0,133,203,133,205,169,224,133,204,165,106,56,233,5,133,106,24
1980 DATA 105,1,133,206,162,4,160,0,177,203,145,205,200,208,249,230,204,230,206,202,208,242,96
1990 A=USR(ADR(MCS$)):CSPAGE=PEEK(106)+1:CS=256*CSPAGE
2000 RESTORE 2010:FOR J=CS+8 TO CS+103:READ A:POKE J,A:NEXT J:RETURN
2010 DATA 0,0,2,9,39,9,2,0
2020 DATA 0,0,128,96,216,96,128,0
2030 DATA 10,37,154,152,152,154,37,10
2040 DATA 160,88,166,38,38,166,88,160
2050 DATA 15,61,55,247,247,55,61,15
2060 DATA 240,124,220,255,95,220,124,240
2070 DATA 60,220,215,221,223,220,220,60
2080 DATA 60,55,215,119,247,247,55,60
2090 DATA 0,2,1,2,1,2,1,0
2100 DATA 2,1,8,4,32,16,128,64
2110 DATA 0,0,0,24,0,0,0,0
2120 DATA 128,64,32,16,8,4,2,1