First Book of VIC Games (1983)
First Book of VIC Games (1983)
First Book of VIC Games (1983)
GAMES
Twenty-four games for the VIC-2O; ready
to type in and enjoy. Includes never-
before-published games and chapters on
how to develop your own games.
:+: ■™
5
i
•
om
*■ * ^
rX i
. It
i I ]
1 r LJ . J
Publications,lnc.flS
A Subsidiary Of American Broadcasting Companies, Inc.
following i , A _. _
COMPUTE! Publications, Inc.: 'Time Bomb" Quly), ''Writing a Simulation Game"
(July). The following articles were originally published in COMPUTERS Gazette, copy
right 1983, COMPUTE! Publications, Inc.: "Word Hunt" (July), "Sky Diver" (July).
Reproduction or translation of any part of this work beyond that permitted by Sec
tions 107 and 108 of the United States Copyright Act without the permission of the
copyright owner is unlawful.
ISBN 0-942386-13-2
10 987654321
COMPUTE! Publications, Inc., Post Office Box 5406, Greensboro, NC 27403, (919)
275-9809, is a subsidiary of Ame _au Broadcasting Companies, Inc.," and is not
associated with any manufacturer of personal computers. VIC-20 is a trademark of
Commodore Electronics Limited.
Foreword V
iv
When the first huge computers were built, games were not
what the owners had in mind. Millions of dollars were invest
ed in every machine. Computer time was valuable, and not to
be wasted.
As computers shrank in size and increased in power,
however, it was inevitable that weary programmers would be
gin exploring and programming, devising the forerunners of
Pac-Man and Donkey Kong. Today, a vast number of the world's
computers are built for one purpose only — to play games
with whoever puts in a quarter.
Your VIC-20 is not a dedicated game machine — it is
much more versatile than that. But the VIC's designers knew
that one of the most common uses of the machine would be
play. Like the arcade machines, the VIC can give you experi
ences and entertainment that you could never find anywhere
except in the worlds the computer can create.
This book serves a double purpose. First, it provides you
with a variety of games which you merely type into the com
puter, save on tape or diskette, and then play again and again
as often as you like. Second, because the program is printed,
you can see exactly how the game's creator brought off the ef
fects you like. It will be fairly easy for you to learn techniques
that you can use in your own programs.
In fact, to make this book as useful as possible, many of
the games are accompanied by explanations of how the pro
gram works. Chapters at the beginning and end of the book
will also help you learn how to write your own games.
Much of the value of this book comes from its variety.
Besides being fun, "MathMan," for instance, is educational;
'Jumping Jack" can improve eye-hand coordination.
There are games that are simple and slow enough for
small children. There are also games as fast and challenging
as anything in the arcades.
No matter what level of programming skill you have
reached, there will be programs from which you can learn
techniques, ranging from fairly simple BASIC games to a so
phisticated all-machine-language game like "Richthofen's
Revenge."
Even if you are a subscriber to COMPUTE! Magazine,
there are things here you haven't seen before. One-third of
the games in this book have never been published before and
some of the others have been since refined and improved.
Some of the games here were originally programmed on
other computers, and were "translated" for the VIC. Com
puter translation often requires as much creativity as the orig
inal program, since the refinements and features of computers
can be very different.
VI
iiiil
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Playing Games
with Your vie
Features:
coior, Graphics,
Sound, etc.
Dan Carmichael
128 colors
Here are some short programs that will demonstrate the fea
tures of the VIC-20. Before typing in each program, type
NEW and press RETURN. After entering the program, type
RUN and press RETURN.
The VIC is capable of producing 128 screen and border
color combinations. This short program will display all 128
combinations:
10 FORA=0TO255:POKE36879,A:FORT=1TO100:N
EXTTrNEXTA:POKE36879#27:END
Programmable Characters
Programmable characters are one of the big pluses of the
VIC-20. Instead of being restricted to the characters on the
VIC's keyboard, you may, if you wish, program your own
special characters into the VIC. "Balloons," one of the games
found in this book, uses programmable characters to draw the
balloons. The following short program also shows how this
feature works.
10 POKE51,0:POKE52,28:POKE55 # 0:POKE56,28
:POKE36869,255:PRINTU{CLR}{2 DOWN}11
20 FORA=7168TO7223:READB:POKEA,B:NEXT
30 PRINT"{CLR}{6 DOWN}{7 RIGHT}AB@@@CD"
40 GETA$:IFA$=IMITHEN40
100 DATA0,0,0,0,0,0,0,0,24,28,127,192,89
,67,192,127,0,0,240,8,238,193,1,254
110 DATA7,8,18,16,20,19,8,7,224,16,72,8,
Playing Games
with Your vie 1
40,200,16,224,8,8#20,20,54,119,20,20
,20,20,20
120 DATA54,54,119,28,20
sound
Sound isn't just decoration. It's also the game programmer's
best tool to let you know that something has happened. A
fanfare to let you know you've just won an extra turn or a
click every time two objects collide — these sounds help you
know what's going on in the game without having to take
your eyes off the main activity.
Sounds also create moods and help build the excitement.
The throbbing sound that gets faster and faster in the arcade
game Asteroids is a good example of this, and musical themes
in other games set a pace or help give you the feeling of
rhythm and speed in your playing. Just try turning down the
volume on a game that uses sound, and see how much hard
er it is to play — and how much less fun.
This short BASIC program written by John Heilborn
(from COMPUTEl's Second Book of WQ will let you hear the
sounds your VIC can make.
Keeping Time
The VIC-20 also has a realtime clock, which can be used
to do anything from simply telling the time to counting
down a timed round in a game. The following short program
will turn your VIC-20 into a timepiece. When asked to enter
the current time, enter it in this format:
1 Playing Games
With Your VUG
HHMMSS
HH =hours, MM =minutes, and SS =seconds. Then press
RETURN. For example, to enter 12 noon (12:00:00) enter
120000; to enter 1:45:50, enter 014550.
Graphics
High-resolution graphics allows you to program games that
have arcade-style pictures with smooth movement of charac
ters across the screen.
If youll type the letter A, then take a close look at your
TV screen, youll notice that the character is constructed of
many tiny dots. These dots are called pixels. Each standard
VIC character is composed of eight rows and eight columns of
pixels, for a total of 64 in each letter "block." Some pixels are
turned on, to show the letter; others are off, so that the back
ground color is displayed. In effect, then, when you type the
letter A you are moving a block of 64 pixels to the screen,
some turned off and some turned on, in the pattern shown
in this diagram:
r1
■ - ■
•■■ m I ; ■
■ ; ■ i 1
m m
1 ^
jji
■ : ■
m ■ ; |
The letters A and D as drawn by the Vic.
Playing Games <
with Your VIC
Machine Language
Another very nice feature of the VIC-20 is the ability to pro
gram in VICs native language — machine language. Most com
mercial games you buy for the VIC are written in machine
language, because it's much faster than BASIC, and because it
uses less memory than the same program would use even if
it could be written in BASIC.
As a demonstration of just how much faster machine
language can be, enter these two short programs. First, type
in the following BASIC program, and then RUN. It will fill
the screen with periods (.), then tell you how long it actually
took to do it.
1 B=7680:C=38400:IF4*(PEEK(36866)AND128)
+64*(PEEK(36869)AND112)=4096THENB=4096
:C=37888
10 PRINTli{CLR}iI:D=505:TI$="000000M:FORA=
0TOD:POKEB+A,81:POKEC+A,6:NEXT:PRINTT
1/60:END
As you can see, this BASIC program took about four seconds
to fill the screen.
The next BASIC program will POKE a short machine
language program into memory, then RUN it. This program
will also fill tjhe screen with periods, then print the time, in
seconds, the task took. (Be careful when entering the DATA
statements: an error can cause the program to do very odd
things.)
5 FORA=828TO859:READB:POKEA,B:NEXT
10 POKE251,0:POKE252,30 2POKE253,0:POKE25
4#150
20 IF4*(PEEK(36866)AND128)+64*(PEEK(3686
9)AND112)=4096THENPOKE252,16:POKE254,
148
30 PRINT" {CLR} {DOWN}PRESS ANY KEY,":PRIN
T"{DOWN}BUT DON'T BLINKlll"
1 Playing Games
with Your vbc
32 GETA$:IFA$=""THEN32
35 TI$=ll000000":SYS828:PRINTTl/60
100 DATA160,0#169,81,145,251,200,208,251
,230,252,145,251,200,208,251,169,6,1
45,253,200
110 DATA208,251,230,254,145,253,200,208,
251,96,234
Richard Mansfield
initialization
From lines 10 through 80 we are "teaching" the computer
some basics about this game. Initialization is the activity
which must take place before any of the action can begin.
Computers are so fast that they will zip up through these
lines and start things off in the main loop at line 100 in a
flash. However, as programmers, we are aware that several
preliminary events took place inside before anything else.
In line 20, the computer discovers that there is a variable
called "dollars" which is to equal 500. It sets aside a section
(like a small box) in its memory which it labels "dollars."
When the game is running, it will add or subtract from this
"box" (lines 230-240) to keep a running total of how much
money you have left to bet. From time to time (line 110), it
will check the box and report to the player how much he has.
The box labelled "dollars" is called a variable because during
the game the amount in it will vary.
Lines 30 through 60 are simple enough — they ask the
player to give his or her name. The computer "memorizes" it
in another "box" called "name$" and can now speak more
personally to the player in lines 140 and 230. Also, the com
puter prints the rules of the game in line 60.
Line 70 "reads" four names (the face cards) from the data
tables in lines 510 on. It also makes a "mental note" that it
already READ four items. So, when it's asked to READ again
(line 80), it will start with the next unread item of data which
will be "clubs." By now, the computer has "memorized" a
variety of important facts: the player's name, the amount of
his or her betting purse, the names of the face cards, and the
suits of a standard deck. In less than a second, the computer
10
Playing Games
with Your V8C
The Subroutine
Twice in the main loop, we GOSUB 300. First the player, then
the computer, draws. Line 310 randomly picks two numbers,
the card and the suit. If line 320 finds that this selection
matches the one drawn just before by the player, it goes back
for another draw. Line 330 makes the name of the card be the
number if it wasn't a number higher than 10 (a face card).
Then line 340 announces the draw using three variables.
The first variable (player$) is set up in either line 160 or 190
as appropriate. Then the card$ and suit$ variables are selected
from the lists that were "memorized" back in the initialization
phase (lines 70-80). The subroutine then RETURNS to the
main loop.
Lines 210-240 decide and announce the winner of this
round. First, if the variable "card" (the computer's card) is
greater than ( >) "yourcard," the computer is declared the
winner in line 240, the purse is adjusted, and the main loop
is restarted (GOTO 100). If the cards are equal, nothing hap
pens to the purse and the next round begins. Notice that we
don't need to say "IF YOURCARD > CARD" at the start of
line 230 to test if the player has won. It's the only possible
thing if the computer has gotten this far.
Once you've solved a particular problem, you'll find you
can use the solution in many future games. This subroutine
11
Playing Games
with Your Vic
which draws cards, for instance, would work just as well for
Poker, or Blackjack, or dozens of other games. Subroutines
are handy not only because they can be used repeatedly
within a program, but because they can be saved and used
repeatedly in future programs. So think up a simple, tradi
tional game and teach it to your computer. There is probably
no more pleasurable way to learn programming than to write
a game.
12
Pflaylng Games
with Your vie
290 REM
300 REM*SUBROUTINE TO DRAW THE CARDS*
310 CARD=INT(RND(5)*13)+2:SUIT=INT(RND(5
)*4)+l
320 IF CARD=YOURCARD AND SUIT=YURSUIT TH
EN 300:REM NO IDENTICAL DRAWS
330 IF CARD<11 THEN CARD?(CARD)=STR$(CAR
D)
340 PRINT PLAYER$ " DRAWS THE " CARD$(CA
RD) " OF " SUIT$(SUIT)
350 RETURN
490 REM
500 REM* DATA TABLE*
510 DATA JACK,QUEEN,KING,ACE
520 DATA CLUBS,DIAMONDS,HEARTS,SPACES
13
1 vg Games
with Your vie
Writing A
Simulation Game
Richard Mansfield
Realtime Action
Arcade games feature what's called realtime action. Unlike
chess or bridge, things happen fast. You can't sit back and
plan your next move; you must react immediately to the
space invaders. In other words, events take place at the same
speed as they would in reality: realtime.
Arcade games also have a strong appeal to the eye and
ear. There is much animation, color, and sound. In fact, your
ability to respond quickly and effectively depends in part on
all the clues you get from the graphics and sound effects.
Strategy, while often an aspect of arcade play, is clearly secon
dary. These games are a new kind of athletics: the fun of
man versus machine. Like auto racing, arcade games are es
sentially isometric exercises — you don't run around; you just
stay in one place flexing and unflexing your muscles, tensing
and relaxing.
14
Playing Cannes
With Your V8C
imitations of Life
The third category, simulation, is the least common kind of
computer game. This is because to really imitate something,
to simulate it effectively, you need lots of computer memory to
hold lots of variables. However, memory has recently become
far less expensive so we can expect to see increasingly effec
tive simulation games. Star Trek and Hammurabi, both simula
tions, have long been popular home computer games. Al
though they are similar to adventure games, simulations are
random. That is, there is no secret to discover, no puzzle to
solve, no plot. Like real life, things happen with unpredict
able, complex results.
Here's a program which simulates investing. The key to
simulating is to arrange realistic interactions between variables.
Look at line 600. If there is "international unrest," the price of
gold (PGLD) goes up and the price of Bundtfund stock (PB)
goes down. This relationship between gold, stock, and an in-
15
1 Playing Games
with Your V8C
Suggested complications
This is the core, a rough sketch, of an investment simulation
game. There is much you can do to make it a more effective
simulation and thereby a more enjoyable game. The more
variables in a simulation, the better. For example, add leverage
and additional "incidents" which affect prices, improve the
randomizing, and include other types of investments. You
could even use a separate counter which, every five years,
causes the X and Y variables to swing more widely to reflect
recession/recovery cycles.
As you can see, a simulation should be lifelike. It has in
terdependent cycles and a degree of unpredictability. Its real
ism derives from including a sufficient number of variables.
And those variables must interact in plausible ways and with
just the right amount of randomness. A simulation is a little
world you create. You can define cause and effect and then
fine-tune the whole thing until it seems well-balanced. Ad-
16
Playing Games
with Your vie
17
Playing Games
Wltti Your vie
40 PRINT:PRINT"GRAND TOTAL":PRINT"(INVES
TMENTS + CASH){4 SPACES}$"T+CASH
45 IFCK=1THEN500
50 PRINT: PRINT"1.BUY{2 SPACES}2.SELL
{2 SPACES}3.DONE"
60 INPUTA:IFA=3THENCK=1:GOTO31
100 PRINT"WHICH?{3 SPACES}l.GOLD
{2 SPACES}OR{4 SPACES}2.STOCK"
110 INPUTF
120 PRINT"HOW MANY (SHARES OR{3 SPACES}0
UNCES)?"
130 INPUTN
140 IFF=1THEN160
150 PRICE=PB*N:IFA=1THENCASH=CASH-PRICE:
B=B+N:GOTO400
155 CASH=CASH+PRICE:B=B-N:GOTO400
160 PRICE=PGLD*N:IFA=1THENCASH=CASH-PRIC
E:GLD=GLD+N:GOTO400
170 CASH=CASH+PRICE:GLD=GLD-N
400 GOTO50
500 PRINT"PRESS ANY KEY TO CONT" ;
503 GET C$:IF C$=""THEN 503
505 CK=0:PRINT:PRINT"{CLR}ONE MONTH LATE
R ...":FORT=1TO700:NEXTT:PRINT
510 X=INT((RND(1)*100)/10):Y=INT((RND(1)
*200)/l0):Z=RND(l)
520 CH=CH+1:IFCH>4ANDCH<XTHENCH=0:GOTO60
0 *
525 IFCH=2GOTO700
530 IF Z>.5THENPB=PB+X:PGLD=PGLD-Y:GOTO3
1
540 PB=PB-X:PGLD=PGLD+Y:GOTO31
600 PRINT"INTERNATIONAL UNREST...":PGLD=
PGLD+2*Y:PB=PB-2*X:GOTO31
700 PRINT"MARKET RALLY ...{2 SPACES}":PG
LD=PGLD-2 *Y:PB=PB+3 *X:GOTO31
18
Playing Games
witm Your vtc 1
Richard Mansfield
When you bring home your computer, usually the first thing
everyone expects you to do is to write an arcade game. Who's
"everyone"? It could be your children, your friends, even you -
anybody who is tired of spending lots of money and wants
you to program a game to play at home for free.
The best defense is to politely point out that:
1. Arcade games are among the hardest types of software
to write.
2. Professionals, working in teams, can take a year to
write one.
However, it is well worth trying to write action games.
You might not be able to duplicate the speed or complexity of
professional games, but you can create very entertaining
games of your own. After you've spent a few weeks getting
familiar with BASIC and have typed in a few games, you are
ready to take up the challenge. This is one of the best ways
to learn some important programming techniques and to ex
plore the graphics and sound capabilities of your computer.
19
Playing Games
with Your vbc
POKE Ping-Pong
One of the simpler arcade games is a simulation of Ping-
Pong. You need to keep track of only three things: two
paddles and one ball. Let's start off by solving the hardest
problem. How can we bounce a ball around the screen both
quickly and accurately?
The key to the problem is the fact that many computers
have an area set aside in RAM which is an image of what you
see on screen. This is called memory-mapped video and most
computers have it. It means that if you POKE into that area of
RAM, a character will appear on the screen. The next RAM
byte address is the next space on screen, and so on. You can
use this built-in "map" to tell what is where by using the fast
'PEEK" command, and you can move things quickly with
POKEs.
The example program will work on all VICs.
SCR =The address where screen RAM memory starts.
LN =The length of one screen line.
WALL =A solid square that appears when this number is
POKEd anywhere into SCR.
BLANK =A blank space character that returns the screen
to normal if POKEd into SCR on top of a WALL or
FIGURE.
FIGURE =A character that, when POKEd into SCR, looks
like a ball.
The memory cells holding the screen image are located in
different places. The VIC determines where it starts by using
20
Playing Games HI
with Your Vic I
21
1 Playing Games
with Your vie
22
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Maze
Games 2
'Time BomW for the unexpanded VIC creates a maze which is three
screens long. The game uses machine language to create the maze
and allows scrolling up and down.
You play "Time Bomb" against the clock. You start at the bot
tom of a maze which is about three times the size of the
VICs screen. At the top of the maze is a time bomb ticking
away. The closer it gets to blowing up, the higher pitched the
ticking becomes. If you reach the bomb, you must steer the
pointer into it to defuse it. If you are successful, you have a
go at the same maze, but with the bomb in a different place
and with a shorter fuse. This continues until you run out of
time. If you fail to defuse it, you get a new maze and a new
bomb with a longer fuse.
Time Bomb is quite challenging to a player's memory of
spatial relationships. People who are at first intimidated by
seeing only a portion of the maze quickly become accustomed
to thinking ahead and remembering the dead ends and clear
paths through the maze. An ability to recall the good and
bad moves is crucial to getting into the later rounds.
My aim was to create something more challenging than a
single screen maze. I then hit on the idea that makes this
game so entertaining: to make the maze larger than the
screen and bring it on and off the display by scrolling it out
of a much larger block of memory.
25
2 Maze
Games
the maze area with the proper character, another fills the
screen's color RAM with the proper color, and the third one
scrolls the maze. I could have used BASIC POKEs to do all
these things, but the time consumed would be too great. It
would be impossible to use POKEs to scroll the maze with
enough speed to be any fun at all.
26
Maze
Games 2
27
Maze
Games
26 J=PEEK(A9):P0KEA9,HL:IFJ<4THENA9=A9-A
(J):GOTO22
27 TB=SC+INT(RND(0)*20)+220:ON-(PEEK(TB)
<> 32)G0T02 7:POKETB,42
28 SYS830:POKE828,204:POKE829,28:SYS923:
GOTO4
29 FORI=830TO974:READA:POKEI,A:NEXT:RETU
RN
30 DATA169,238,141,15,144,169,0,133,251,
169,150,133,252,160,0,169,10,145,251,
200,208
31 DATA251,230,252,165,252,201,152,208,2
41,96,169,84,133,251,169,24,133,252,1
60,0,169
32 DATA209,145,251,200,208,251,230,252,1
65,252,201,30,208
33 DATA241,96,173,60,3,56,233,22,176,3,2
06,61,3,141,60,3,56,176,19,234,173,60
,3,24,105
34 DATA22,144,3,238,61,3,141,60,3,24,144
,1,234,169,0,133,0,169,30,133,1,173,6
0,3,133
35 DATA254,173,61,3,133,255,169,0,133, 25
3,160,0,177,254,164,253,145,0,132,253
,230,253
36 DATA234,208,2,230,1,230,254,208,2,230
,255,169,32,197,1,208,227,96
37 POKEV,15:FORT=255TO127STEP-2:POKES,T:
POKEV-9,255:FORG=1TO10:NEXT
38 POKEV-9,242:FORG=1TO10:NEXT:POKEV-9,2
40:NEXT:POKEV-1,220:FORG=15TO0STEP-.0
5
39 POKEV,G:POKEV+1,G*10:NEXT:POKEV-1,0:P
OKEV+1,238:GOSUB42:RUN
40 POKETB,32:POKEV-1,253:FORG=30TO0STEP-
.15:POKEV,G/2:NEXT:X=X+50:IFX>449THEN
X=450
41 POKEV-1,0:F=0:K=X:R=R+1z GOSUB42:GOTO2
7
42 PRINT"{HOME}ROUND"R"{LEFT} ":PRINT"
{DOWN}PRESS F7 ":A$="":GETA$:ON-(PEEK
(197)<>63)GOTO42:RETURN
28
Maze
Games 2
Hidden Maze
Gary Boden
Translated for the VIC by Charles Brannon.
The maze is there — you just can't see it! This maze game adds a
new twist to maze puzzles.
Program Description
The maze is constructed (lines 480-580) in the manner de
scribed in Appendix A, but by filling color memory with the
value for the screen color (line 520), the maze is made invis
ible. As the player proceeds through the maze, the color
memory for the characters around the player is POKEd with
values which make walls visible (lines 170-200). The player al
ways starts in the center and tries to reach "home" in the
upper-left corner.
29
Maze
Games
The more success you have, the more maze you will see in
"Hidden Maze"
line 250 checks if a wall has been hit, and line 270
checks whether the end of the maze has been reached. Line
280 flashes the screen when the player reaches home. Scoring
is based on the time taken to travel the maze, using the VIC's
built-in clock (lines 160, 300-310).
30
Maze
Games 2
180 POKE CMEM+PP+DIR(I),5
190 POKE CMEM+PP-DIR(l),5
200 NEXT I
210 POKE37154/127:X=(NOTPEEK(37151))AND6
0-((PEEK(37152)AND128)=0):POKE37154,
255
211 IFX=0THEN210
215 TP=PP-22*((XAND8)>0)+22*((XAND4)>0)-
((XAND1)>0)+((XAND16)>0)
220 CHR=-(3*((XAND16)>0)+4*((XANDl)>0)+5
*((XAND4)>0)+6*((XAND8)>0))
230 IFCHR<3ORCHR>6THENCHR=5
240 IF(XAND32)THENPOKECC,8:FORW=1TO2000:
NEXT:POKECC,27:FORW=1TO2000:NEXT
250 IF PEEK(SC+TP)<>32 THEN 270
260 POKE SCR+PP,32:POKE SCR+TP,CHR:POKE
CMEM+TP,2:PP=TP
270 IF PP<>23 THEN 170
280 FORI=1TO100:POKE CCTRL,255*RND(0):NE
XT:POKECCTRL,27
290 PRINT"{CLRHrVSHPUR}YOU DID IT!":PO
KE36869,240
300 SEC=INT((TI-T)/60)
310 PRINT"{GRN}IN";SEC;"SECONDS
320 PRINT:PRINT"{CYN}PRESS{RED}{RVS}SPAC
E{2 OFF}{CYN} TO":PRINT"PLAY AGAIN.
{BLU}"
340 GETA$:IFA$=""THEN340
350 RUN
360 REM LOAD CHARACTER SET
365 CHSET=7168:POKE51,240:POKE52,CH/256-
1:POKE55,240:POKE56,CH/256-1
370 FORI=0TO7:POKECH+256+I,0:NEXT
380 READA:IFA=-1THENRETURN
390 FORJ=0TO7:READB:POKECHSET+A*8+J,B:NE
XTJ
400 GOTO380
410 DATA3,56,124,174,174,254,186,68,56
420 DATA4,56,124,234,234,254,186,68,56
430 DATA5,56,84,214,254,254,186,68,56
440 DATA6,56,124,254,214,214,186,68,56
441 DATA7,255,255,255,255,255,255,255,255
31
2 Maze
Games
470 DATA-1
480 POKE36869,255
485 PRINT"{CLR}t22 DOWN}{RVS}GENERATING
MAZE{HOME}{OFF}";
490 SC=7680:CMEM=38400:CCTRL=36879
500 DIMA(3):A(0)=2:A(1)=-44:A(2)=-2:A(3)
=44
510 A=SC+23tWL=7:HL=32
520 FORI=1TO21:PRINT"{WHT}GGGGGGGGGGGGGG
GGGGG":NEXT:POKEA,5
530 J=INT(RND(1)*4):X=J:POKESC+505,J+l28
:POKECM+505,8*RND(0)
540 B=A+A(J)
550 IFPEEK(B)=WLTHENPOKEB,J+1:POKEA+A(J)
/2,HL:A=B:GOTO530
560 J=-(J+1)*(J<3):IFJ<>XTHEN540
570 J=PEEK(A):POKEA,HL:IFJ < 5THENA=A-A(J-
1):GOTO530
575 PRINT"{HOME}{22 DOWN}{17 SPACES}
{HOME}";:POKESC+505,32
580 RETURN
32
Maze
Games 2
Anthony Godshall
Fast action and strategy make this maze game fun for all ages.
33
2 Maze
Games
If you clear the maze of all the treasures, you will receive
a bonus, depending on your skill level and score, and will
start a new screen with a higher skill level. Don't be disap
pointed if you don't get a good score the first time. I find that
most people learn quickly.
34
Maze1
Games
1250 J$=STR$(P*SK):FORJ=1TOLEN(J$):POKES
C+J+489,ASC(MID$(J$,J,l)):NEXT
1300 PRINT"Q{LEFT}";
1310 IFPO=61THENPRINTDN$"NO MORE TREASU
RE.";:GOTO7000
1900 RETURN
2000 IFLEN(F$)>=30THENGOSUB3000
2005 FM=FM+1:1FFM/S< >INT(FM/S)THENRETURN
2006 FORH=1TOSKL:
2007 POKEFNPLOT(0),32
2010 J$=LEFT$(F$,1) :F$=MID$(F$,2)
2030 POKEV,15:POKES1,254-LEN(F$):FORM=1T
O10:NEXT:POKE36875,0
2100 IFJ$="{UP}"THENYF=YF-1:GOTO2200
2110 IFJ$="{RIGHT}"THENXF=XF+1:GOTO2200
2120 IFJ$="{DOWN}"THENYF=YF+1:GOTO2200
2130 IFJ$="{LEFT}"THENXF=XF-1:GOTO2200
2150 GOTO2200
2200 POKEFNPL(0),42
2205 NEXT
2210 RETURN
3000 POKEFNPL(0),32
3007 S=S-1:IFS<1THENS=1
3008 J$=STR$(EL-S):FORJ=1TOLEN(J$):POKES
C+J+502,ASC(MID$(J$,J,l)):NEXT
3010 FORC=1TO10:J$=MID$(F$/C,1):IFJ$="
{UP}"THENYF=YF-1:GOTO3100
3020 IFJ$="{DOWN}"THENYF=YF+1:GOTO3100
3030 IFJ$="{RIGHT}"THENXF=XF+1:GOTO3100
3040 IFJ$="{LEFT}"THENXF=XF-1:GOTO3100
3100 POKEFNPL(0),42
3150 IFC/SK=INT(C/SK)THENGOSUB1000
3310 FORM=CTOC+2:POKES2,M*3+130:FORN=1TO
10:NEXT:NEXT:POKES 2,0
3350 POKEFNPLOT(0),32
3400 NEXT
3500 F$=MID$(F$,EL):RETURN
4000 IFX=XFANDY=YFTHENPRINTDN$"A TASTY M
ORSEL INDEEDl";:GOSUB6000:GOTO11000
4500 RETURN
6000 POKE36877,220:FORL=15TO0STEP-1:POKE
36878,L:FORM=1TO300:NEXT:NEXT:POKE3
6877,0:POKE36878,15
35
Maze
Games
6010 RETURN
7000 FORK=1TO30
7005 POKE36876,220:FORL=1TO5:NEXT:POKE36
876,0:FORL=1TO5:NEXT:POKE36876,200:
FORL=1TO5:NEXT
7010 POKE36876,0:FORL=1TO5:NEXT:NEXT
7100 J=INT(P/256):P0KE1,J:POKE2,P-J*256
7200 SK=PEEK(0)+1:POKE0,SK:GOTO45
7999 GOTO7000
8000 FORM=1TO500:GOSUB1000:IFLEN(F$)< 20T
HENNEXT
8010 FORJ=8142TO8142+20:POKEJ,32:NEXT
8100 GOSUB1000:GOSUB2000:GOSUB4000:GOTO8
100
10000 DN$="{HOME}{21 DOWN}{RVS}{WHT}"
10030 S=10:PC=0:SC=7680:RO=22
10050 DEFFNPL(XX)=(YF*RO+XF)+SC
10060 DEFFNCH(XX)=PEEK((Y*RO+X)+SC)
10077 SO=10:POKE36878,15
10100 DD=37154:D1=37151:D2=37152:AD=63
10110 WL=102:DI=90:SP=65:CL=88:HE=83:CI=
87:EL=11
10120 V=36878:S1=36875:S2=36876
10500 TI$="000000"
10600 PRINTDN$"{7 SPACES}GO i 1 11 I 1
{5 SPACES}"
10700 PRINTDN$"{OFF}{DOWN}{BLK}SCORE:
{WHT}{7 SPACES}{BLK}SPEED:{WHT} 1
{HOME}"
10800 PRINT"{HOME}{RIGHT}{DOWN}";:X=l:Y=
1:XF=1:YF=1
10900 GOTO8000
11000 REM GAME OVER
11010 POKE37154,255
11105 PRINT:PRINT"{DOWN}TIME WAS ";MID$(
TI$,3,2);" MINUTES, ";RIGHT$(TI$,2
);" SECONDS"
11110 PRINT"PLAY AGAIN ?
36
Maze1
Games i
11150 PRINT:PRINT"{UP}";:G0T011110
12000 DIMA(3):A(0)=2:A(1)=-44:A(2)=-2:A(
3)=44:WL=102:HL=32:SC=7680:A=SC+23
:J=RND(-TI)
12010 POKE36879,110
12100 PRINTCHR$(142)"{CLR}{YEL}{OFF}";:F
ORI=1TO21:PRINT"E21 +3":NEXT:P0K
EA,4
12200 J=INT(RND(1)*4):X=J
12205 B=A+A(J)
12210 IFPEEK(B)=WLTHENPOKEB,J:POKEA+A(J)
/2,HL:A=B:GOTO12200
12240 J=( J+l) *- (J<3) : IFJOXTHEN12205
12250 J=PEEK(A):P0KEA,HL:IFJ<4THENA=A-A(
J):GOTO12200
12300 PRINT" {HOME} {DOWN} {RIGHTjV"
12305 READJ,K,C:IFJ<0THEN12500
12310 FORA=1TOJ
12320 B=INT(RND(1)*410):IF(B-21)/22=INT(
(B-21)/22)THEN12320
12330 IF PEEK(B+7702)<>32THEN12320
12340 POKEB+7702,K:POKEB+38422/C
12350 NEXT:GOTO12305
12400 DATA2,90,1,4,65,0,7,88,5,9,83,2,39
,87,3,-1,0,0
12450 PRINT"12450:P="P
12500 RETURN
14000 POKE36879,46
14010 PRINTCHR$(14)"{CLR}{WHT}{6 DOWN}
{2 RIGHT}{4 SPACES}gl0 @3
{12 SPACES}{RVS}SUPERCHASE{OFF}"
14050 PRINT"{5 DOWN} SKILL LEVEL (1-9):
{RVS} {OFF}{2 LEFT}";
14060 GETJ$:IFJ$=""THEN14060
14070 SK=VAL(J$):IFSK<1ORSK>9THEN14060
14075 POKE0,SK
14080 PRINTSK:POKE0,SK:RETURN
37
2 Games
This maze keeps changing. The object is to move across the screen as
efficiently as possible. Points are deducted from your score when you
run into a wall. Caution is more important than speed.
Each leprechaun has his own pot of gold, but the lepre
chauns want to keep their gold and not share it with the big
people, the human population of Ireland. So leprechauns
have become very tricky. Very few Irishmen have ever seen a
leprechaun, and nobody has ever been able to keep a lepre
chaun's pot of gold.
Lochinvar is king of the leprechauns. He is king because
he's the trickiest of all the Little People. He doesn't have a pot
of gold, however. Lochinvar's treasure is in diamonds.
Lochinvar has hidden his diamond treasure at the end of
a maze. The maze is built of tall hedges, like the hedge
mazes in many gardens throughout the world. Lochinvar's
maze is different, though: it moves. The maze changes shape
as people try to go through it, making it hard to reach
Lochinvar's diamonds.
Although Lochinvar is tricky, you are fast. If you are fast
enough, you may be able to reach Lochinvar's diamonds be
fore the maze confuses you and you become lost. Don't go
too fast, however. The maze is built of thorns, and whenever
you run into a hedge wall you'll get a skin full of prickles.
38
Maze
Games 2
How to Play
"Lochinvar's Maze" is a game of skill and speed. You must
move through the maze and find the diamonds. If you run
into a wall, a beep will sound, and points will be deducted
from your score.
You'll begin the game on the left side of the maze. To
move upward, press Fl. To move down, press F3. Press the
letter A to move across the board. Move as quickly as you
can without touching the sides or walls of the maze. The
game continues until you touch the diamond on the right
side of the maze.
At the end of the game, you will receive a score ranked
from 1 to 100. The score is based on the time it took you to
reach the diamond treasure, minus the number of times you
ran into the moving hedge. A score of 80 or above qualifies
you as an expert diamond hunter. If you reach 90, you may
want to move to Ireland to take on the other leprechauns.
39
2 Maze
Games
125 POKE36879,27
130 PRINT"{CLR}{DOWN}WELCOME TO...
{2 DOWN}":PRINT"{5 SPACESJLOCHINVAR'
S{2 SPACES}":PRINT"{2 DOWN}
{7 SPACES}M A Z E"
140 INPUT "{4 DOWN}INSTRUCTIONS (Y/N)";X$
150 IFX$="N"THEN500
160 IFX$="Y"THEN5000
170 GOTO140
500 POKE 36879,28:PRINT"{CLR}"
505 PC=0
510 FORX=1TO21STEP2
520 Z=INT(RND(1)*23)
530 FORY=0TO22
540 IFY=ZANDX<>21THEN560
550 POKEP1+X+(Y*22),160:POKEP2+X+(Y*22),4
560 NEXTYrNEXTX
570 POKEPl+242,81:POKEP2+242,0
580 POKEP1+241, 32:POKEP2+241,1:POKEP1+263
,90:POKEP2+263,0:POKEP1+285,32:POKEP
2+285,1
590 X=11:Y=0:MN=220:MD=50:GOSUB700:MN=230
:MD=100:GOSUB700:GOTO1000
700 POKE36878,15:POKE36876,MN:FORQQ=1TOMD
:NEXTQQ
710 POKE36878,0:POKE36876,0:RETURN
1000 AA=INT(Tl/60)
1005 LC=0
1010 Z=PEEK(197)
1020 IFZ=17THEN1100
1040 IFZ=39THEN1300
1050 IFZ=47THEN1400
1060 LC=LC+1
1070 GOTO4000
1100 X1=X:Y1=Y+1:GOTO2000
1300 X1=X-1:Y1=Y:GOTO2000
1400 X1=X+1:Y1=Y
2000 IFXK0ORX1>22ORYK0ORY1>21THEN2080
2010 Z=PEEK(P1+(X1*22)+Y1)
2020 IFZ=90THEN3000
2030 IFZO32THEN2080
2040 POKEP1+(X*22)+Y,32:POKEP2+(X*22)+Y,1
40
Maze
Games 2
2050 X=X1:Y=Y1
2060 P0KEP1+(X*22)+Y,81:P0KEP2+(X*22)+Y,0
2070 GOTO1010
2080 MN=128:MD=70:GOSUB700:PC=PC+1:GOTO10
10
3000 ZZ=INT(Tl/60)
3001 POKEP1+(X*22)+Y,32
3002 MN=220:MD=50:GOSUB700:MN=230:MD=100:
GOSUB700
3005 GETX$:IFX$<>""THEN3005
3010 PRINT"{CLR}{DOWN}TOTAL SECONDS:"ZZ-A
A
3015 PRINT"{DOWN}PENALTIES:"PC
3016 X=115-(ZZ-AA)-(PC*5)
3017 IPX>100THENX=100
3018 IFX<1THENX=1
3019 PRINTM{DOWN}RANKING(1-100):"X"
{4 DOWN}"
3020 INPUT "{2 DOWN}ANOTHER MAZE (Y/N)";X
$
3030 IFX$="N"THENPOKE36879,27:PRINT"{CLR}
11: END
3040 IFX$="Y"THEN500
3050 GOTO3020
4000 ONLCGOTO4010,4020,4030,4040,4050,406
0,4070,4080
4010 L1=INT(RND(1)*10):GOTO1010
4020 L2=INT(RND(1)*23):GOTO1010
4030 L3=P1+1+(L1*2):GOTO1010
4040 L4=0:GOTO1010
4050 IFPEEK(L3+(L4*22))=32THEN1010
4052 L4=L4+1:IFL4>22THEN1005
4054 LC=LC-1:GOTO1010
4060 L6=L3+(L2*22):GOTO1010
4070 IFPEEK(L3+(L4*22))<>32THEN1005
4075 POKE(L3+(L4*22)),160:POKEP2+(L3-Pl+(
L4*22)),4:GOTO1010
4080 POKEL6,32:POKEP2+(L6-P1),1:GOTO1005
5000 PRINT"{CLR}{DOWN}{2 SPACES}THIS MAZE
IS A TEST {DOWNjOF SKILL AND SPEED
.{3 SPACES}{DOWN}YOU({BLK}Q{BLU}) M
UST MOVE"
41
2 Maze
Games
42
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Action
Games
Closeout
L.L. Beh
Translated for the VIC by Charles Brannon.
Special Techniques
In an attempt to get the most speed from a BASIC program
while using the least amount of memory, there are several
45
Action
Games
Artificial intelligence?
A game like this is the perfect opportunity to fiddle with arti
ficial intelligence. When you write a routine that makes a
character chase another, you've simulated a simple animal's
"instincts," or predetermined behavior.
The crazed shoppers in Closeout must know how to
home in on you. Their behavior must include the ability to
get on and off the escalators. One thing you should watch
out for when writing games like this is predictability. If your
"intelligence" subroutine is too good, your creatures will accu
rately home in on the victim, but they will act in predictable
ways. Sometimes it helps to stir a little randomness in with
the RND function (we humans call such "careful" random
ness creativity).
Since all three pursuers use the same "intelligence" algo
rithm, we've just created "mini-arrays" that hold important
variables for each character: the X and Y position, the charac
ter used, the current direction, and the character "under
neath" the pursuer. To move a character nondestructively, you
have to save and restore the background characters. The rou
tine can move any of the three chasers according to E, the
"Enemy index." To create the illusion of simultaneous motion
without slowing down the player too much, only one chaser
can move for every move the player makes.
Enhancements
If you have more than the normal 5K RAM memory in your
VIC, you might want to make some enhancements to the
game. You could add custom characters, improved sound ef
fects, and more pursuers.
46
Action
Games '
47
Action
Games
260 FORI=66TO378STEPQ:POKETX+I,64:POKECO
+1,0:P0KETX+21+I,64:P0KEC0+21+I,O:NE
XT
270 FORI=1TO10
280 SX=INT(7*RND(0))*3+3:SY=5+INT(6*RND(
0))*2
290 LN=2+INT(3*RND(O))*2:IF SY+LN>18 THE
N 290
300 FORJ=SY*QTO(SY+LN)*QSTEPQ
310 POKETX+SX+J,64:POKECO+SX+J,O
320 NEXT:NEXT
330 EX%(O)=1:EX%(1)=2:EX%(2)=3:FORI=OTO2
:EY%(I)=3:NEXT
340 EC%(O)=65:EC%(1)=88:EC%(2)=81
350 DX%(O)=1:DX%(1)=1:DX%(2)=-1
360 F0RI=0T02:EP%(I)=46:PC%(I)=INT(6 *RND
(0)+2):NEXT
370 PX=2:PY=17:PC=94:DX=O:DY=O:PK=32
380 GETA$:IFA$<>""THENB$=A$
390 IFB$=" "THENGOSUB800
400 IFB$="I"THENDY=-1:DX=O
410 IFB$="M"THENDY=1:DX=O
420 IFB$="J"THENDX=-1:DY=O
430 IFB$="K"THENDX=1:DY=O
440 CP=TX+PX+Q*PY
450 IFPK<>64ORPEEK(CP+Q*DY)=104THENDY=O
460 IFPEEK(CP+DX)=104THENDX=O:B$=""
470 POKE CP,PK:POKECO+CP-TX,CC
480 PX=PX+DX:PY=PY+DY
490 IFPX<0THENPX=O:B$="":DX=O
500 IFPX>21THENPX=21:B$="":DX=O
510 NP=TX+PX+Q*PY:CC=PEEK(CO+NP-TX)
520 PK=PEEK(NP):IFPK<>46ANDPK<>42THEN560
530 PTS=PTS+1:IFPK=42THENPTS=PTS+49
540 GOSUB980:PK=32:FORI=15TO0STEP-5:POKE
S3,255-1:POKEV,I:NEXT:P0KES3,0
550 M=M+1:IFM=120THEN140
560 IFPK=EC%(O)ORPK=EC%(1)ORPK=EC%(2)THE
N730
570 P0KENP,PC:P0KEC0+PX+Q*PY,2
580 E=-(E+1)*(E<2)
590 EX=EX%(E):EY=EY%(E):EC=EC%(E):XX=DX%
(E):YY=DY%(E):EP=EP%(E):C=PC%(E)
48
Action
Games
600 POKETX+EX+Q*EY,EP:POKECO+EX+Q*EY,C
610 CP=TX+EX+Q*EY
620 IF(PEEK(CP-Q)=64ORPEEK(CP+Q)=64)ANDR
ND(1)>.1THENXX=O:YY=SGN(PY-EY)
630 IFPEEK(CP+YY*Q)=104OR(EY=PYANDEY/2<>
INT(EY/2))THENYY=O:XX=SGN(PX-EX)
640 EX=EX+XX:EY=EY+YY
650 IFEX=OOREX=21THENXX=-XX
660 NP=TX+EX+Q*EY:EP=PEEK(NP):C=PEEK(CO+
NP-TX)
670 IFEP=PCTHENPOKENP,161:GOTO730
675 IFEP<>EC%(0)ANDEP<>EC%(1)ANDEPOEC%(
2)THEN700
680 FORI=OTO2:IFEP<>EC%(I)THENNEXT:STOP
690 EP=EP%(I):C=PC%(I)
700 POKENP,EC:POKECO+NP-TX,3+E
710 EX%(E)=EX:EY%(E)=EY:EP%(E)=EP:PC%(EJ
=C:DX%(E)=XX:DY%(E)=YY
720 GOTO380
730 FORI=128TO255STEP2:POKESC,I:POKES3,I
:POKEV,(I-128)/8:NEXT
740 POKESC,27:PRINTCHR?(19)CHR$(18)CHR$(
156)"{2 SPACES}NABBED1 "
750 PRINTLEFT$(CD$,23);CHR$(31);"PRESS "
CHR$(18);
760 PRINTCHR$(156)"SPACE"CHR$(146)CHR$(3
1)" TO REPLAY";
770 FORI=1TO10:GETA$:NEXT
780 GETA$:IFA$<>" "THEN780
790 RUN
800 REM SHOVE I
810 IFDX=0THENPOKESC,31:POKES2,200:POKEV
, 10 : FORW=1TO100 :NEXT: POKESC, 27 :.POKES
2,0:RETURN
820 IFSH=0THENPOKESC,28:POKES2,255:POKEV
,10:FORW=1TO100:NEXT:POKESC,27:POKES
2,0:RETURN
830 CP=TX+Q*PY:LC=64:B$=""
840 FORI=PXTO-21*(DX>0)STEPDX
850 SV%(I)=PEEK(CP+I):POKECP+I,LC:LC=131
-LC:POKES1,LC:POKEV,(IAND15)
49
Action
Games
860 IFSV%(I)=EC%(O)ORSV%(I)=EC%(1)ORSV%(
I)=EC%(2)THENGOSUB920
870 NEXTI:POKES1,0:POKEV,0
880 FORI=PXTO-21*(DX>0)STEPDX
890 POKECP+I,SV%(I):NEXT:SH=SH-1
900 PRINTCHR$(156);LEFT?(CD$, 23) ;TAB(10)
"SHOVES ="SH;
910 RETURN
920 FORJ=OTO2:IFSV%(I)<>EC%(J)THENNEXT:S
TOP
930 SV%(I)=EP%(J):POKECO+CP+I-TX,PC%(J)
940 EX%(J)=INT(20*RND(O)+1):EY%(J)=3
950 DX%(J)=-1:IFRND(O)>.5THENDX%(J)=1
960 DY%(J)=O:EP%(J)=46
970 PTS=PTS+50:FORJ=0TO15:POKES3,128+J:P
OKEV,15-J:NEXT:POKES3,0:POKEV,0
980 PRINTCHR?(159)LEFT?(CD$,21)"
{6 SPACES}SCORE:"PTS;
990 RETURN
50
Action
Games
Ronny Ong
Scoring Points
Each marble (white dot) collected gives the hunter one point.
If the bully catches him, the marble hunter loses 75 points or
more depending on the skill level reached. The game is over
when the hunter loses more points than he has accumulated.
Eating a vitamin gives the marble hunter two points plus
the ability to scare off the bully — who turns white with fear.
The vitamin's effects soon wear off, especially at higher skill
levels. A warning appears on the status line and a sound tells
you the bully's courage is returning. Catching the bully while
he is frightened is worth ten points, and picking up all the
marbles is worth five. The board number eventually rolls over,
easing the game difficulty should you get so far.
51
Action
Games
The bully tries to pounce on the marble hunter and steal his
marbles.
Game of Strategy
Marble Hunt is a game of strategy as well as hand/eye coordi
nation. There is a full wraparound if you try to go past an
edge of the playfield. Since the bully will usually be thrown
to the opposite side, an edge row or column is the safest
place to be. Right after the bully is transported away from the
hunter is the best time to rack up points with the marbles
near the edges. Plentiful points, along with careful use of
vitamins, will help in the risky process of clearing the mar
bles in the center of the screen.
There are many other keys to good play that are left for
you to figure out.
52
Action
Games 3
N(G)=INT(RND(1)*G)+1:POKE36878,8:GOSUB
500
7 DEFMJH(G)=((PEEK(37151)AND16)=0)-((PE
EK(37152)AND128)=0):POKE37154,127:POKE
36879,9
^lMWt3
|^3) (PEEK (3 7151) AND4) =0) - ((PEE
K(37151)AND8)=0)
10 F=0:P=F:PRINT"{CLR}{GRN}*{WHT}.
. {GRN}* {WHT} " ; :FORI=FTO43
9:PRINT".";
11 NEXT:PRINT"{GRN}*{WHT}
{GRN}*";
12 C=C+1+9*(C=9):PRINT"{HOME}{22 DOWN}
{7 RIGHT}#"C;
15 A=FNRN(21):B=FNRN(21)
20 X=FNRN(21):Y=FNRN(21):IFSQR((A-X)*(A-
X)+(B-Y)*(B-Y))<9THEN20
25 T=7680+B*22+A:IFPEEK(T)=42THENP=1N»RN(
30)+30-C*3:Z=Z+2:POKE36875,150
26 IFPEEK(T)=46THENF=F+1:POKE36875,228
27 IFF<>480THEN30
28 Z=Z+5+F:PRINT"{CLR}{8 DOWN} BOARD CLE
ARED IN "LEFT$(TI$,2):POKE36875/0
29 PRINT"{RIGHT}HOURS, "MID$(TI§,3,2)" M
INUTES.":GOSUB500:GOTO10
30 POKET,27:POKET+30720,7:L=7680+Y*22+X:
M=PEEK(L):MX=PEEK(L+30720)
40 POKEL,29:POKEL+30720,2+(P>0)
50 B=B-^^^}0) :A=A+FNiM(0) :POKE36875,0
70 PRInV'tTHOME}{22 DOWN} {12 RIGHT}PTS"Z+
F"{LEFT} ";
80 POKET,28:IFA>21THENA=0
85 IFA<0THENA=21
90 IFB>2^THENB=0
95 IFB<0THENB=2^
110 X=X+SGN (A-X) * ABS (t=s0) +FNRN (3 ) - 2: Y=Y+
SGN (B-Y) *ABS (P=0) +FNRN:( 3)-2:IFX>21TH
ENX=0
113 IFX<0THENX=21 •:
115 IFY>21THENY=0
116 IFY<0THENY=21
120 POKEL,M:POKEL+30720,MX
53
3 Action
Games
123 IFP=0THEN130/
125 P=P-1:IPP<9THENPRINT"{HOME}{22 DOWN}
ALERT 1";:POKE36876,188-P
127 IFP=0THENPRINT"{HOME}{22 DOWN}
{6 SPACES}";:POKE36876,0
130 POKET,32:POKET+30720,0:IFX<>AORYOBT
HEN25
135 POKE36877,220:FORI=1TO3:FORII=25TO30
:POKE36865,II:NEXT
136 FORII=30TO25STEP-1:POKE36865,II:NEXT
:NEXT:POKE36877,0
140 IFPTHENZ=Z+10:GOTO20;
145 Z=Z-60-C*15:IFZ+F>0THEN15
146 PRINT"{HOME}{22 DOWNjGAME OVER-PLAY
AGAIN?";:POKE198,0
147. GETG$:IF(PEEK(37151 )AND32)=0ORG$="Y"
THENRUN
148 IFG$<>"N"THEN147f
150 FORI=ZTO1200:NEXT:POKE37154,255:POKE
36879,27
155 POKE56,PEEK(56)+2:POKE36869,240:CLR:
PRINT"{CLR}{BLU}";:POKE808,112:END
160 DATA 56,56,18,124,144,18,158,240,56,
56,144,124,18,144,242,30
170 DATA 56,84,254,214,170,124,40,238
210) FORJ=I*8TOI*8+7:READK:POKEJ+CS,K:NEX
T:RETURN
250 X=PEEK(56)-2:POKE52,X:POKE56,X:POKE5
1,PEEK(55):CLR:PRINT"{CLR}ONE MOMENT
II
• • •
255 CS=256*PEEK(52)+PEEK(51)
260 FORI=CSTOCS+511:POKEI,PEEK(l+32768-C
S) :NEXT:FORI=27TO29:GOSUB210}:NEXT
270 POKE36869,255:RUN
500 ?FORI=1TO125:POKE36876,INT(RND(1)*128
)+128:FORII=0TO9:NEXT:NEXT:POKE36876
,0:RETURN
54
Action
Games
Aaron Bobick
In "Balloons" you try to pop all the balloons before they hit
the bottom of the screen.
55
3 Action
Games
120 IFRR=1THENLL=499:PP=0
130 IFRR=2THENLL=999:PP=2
140 IFRR=3THENLL=1699:PP=3
150 PRINT"{CLR}{4 RIGHT}GET";LL+1;"POINT
S"
160 PRINT"{2 DOWN}{7 RIGHT}TO WIN
170 PRINT"{5 SPACES}{2 DOWN}{RIGHT}{RVS}
BALLOONS
190 FORX=7423TO7432:POKEX,0:NEXT
200 PRINT"{2 DOWN}{RIGHT}USE 'A' AND 'D'
TO GO{DOWN}{RIGHT}RIGHT AND LEFT.
210 PRINT"{DOWN}{3 RIGHT}USE {RVS}F7
{OFF} TO FIRE
220 DIMT(10):T(0)=50:T(2)=35:T(4)=25
230 DIMA(22),P(22),S(22):FORI=1TO21:A(I)
=7702+I:P(l)=INT(RND(l)*3) *2
240 S(I)=T(P(I)):NEXT
250 C=13
260 CS=7168
270 REMORI=CSTOCS+511:POKEI,PEEK(1+32768
-CS):NEXT
280 FORI=0TO8*C-1:READJ:POKECS+I,J:NEXT
290 DATA126,255,219,255,129,195,255,126
300 DATA24,24,24,60,102,126,255,255
310 DATA126,106,255,255,231,126,126,126
320 DATA16,24,8,24,16,24,8,24
330 DATA0,60,126,86,126,100,60,0
340 DATA24,16,24,8,24,16,24,8
350 DATA146,36,146,73,36,146,73,146
360 DATA136,132,80,10,164,2,20,65
370 DATA0,66,8,0,0,145,4,32
380 DATA0,4,0,1,68,16,4,145
390 DATA0,0,128,16,128,16,145,34,0,0,0,1
28,193,243,255,255,60,126,231,254,25
2,255,254,60
400 PRINT"{RVS}{DOWN}{6 RIGHT}HIT SPACE"
410 IFPEEK(203)<>32THEN410
420 POKE36869,255:PRINT"{CLR}{RVS}{WHT}
{10 DOWN}iW3{20 RIGHT}
430 POKE36879,110
440 FORI=7392TO7402:POKEI,129:NEXT:AC=128
56
Action
Games
450 E=8174:POKE8185,28:POKE8185-21,28
460 L=0:G=PEEK(203):IFG=17THENL=-1
470 IPG=18THENL=1
480 POKE36878,0
490 IFG=63THENGOTO600
500 IFXOLLTHEN640
510 POKEE,32:E=E+L:IFPEEK(E)=2 8THENE=E-L
520 IFPEEK(E)<>32THEN730
530 POKEE,1
540 REM
550 FORCC=1TOPP
560 ZC=INT(RND(1)*20+1):POKEA(ZC),32:A(Z
C)=A(ZC)+22:IFA(ZC)>8185THEN730
570 POKEA(ZC)/P(ZC)
580 POKEE,1:
590 NEXTCC:GOTO460
600 S=3:D=E-8164:POKEE,1:FORI=E-22TOA(D)
STEP-22:S=S+2+(S=5)*2:POKEI,S:POKE36
876,S*20+128
610 POKE36876,0:POKE36878,15:NEXT:POKEA(
D),32:FORI=A(D)TOESTEP22
620 POKEI,32:NEXT:XC=XC+S(D)+S(D)*(A(D)<
7 900):PRINT"{HOME}{RVS}{WHT}SCORE="X
C:A(D)=7702+D:GOTO550
630 NEXTCC
640 POKE36878,15:FORI=1TO20;POKE36876,12
8+1*6:FORJ=A(I)TO8163STEP22:POKEJ,P(
I):GOSUB670
650 POKEJ,32:NEXT:GOSUB680:POKEJ,11:NEXT
:PRINT"{HOME}{RVS}YOU WIN 111111111"
660 GOTO690
670 FORX=1TO15:NEXT:RETURN
680 POKE36878,15:FORX=128TO255STEP5:POKE
36876,X:NEXT:POKE36878,0:RETURN
690 FORX=1TO500:NEXT:POKEE,1
700 FORX=1TO7:POKEE,1:POKE36878,15:FORO=
1TO100:NEXTO:POKE36876,200
710 POKEE,32:FORR=1TO100:NEXTR:POKEE,32:
POKE36878,0:NEXTX
720 GOTO820
730 POKE36878,15:REM LSE
740 POKE36874,15:FORKT=1TO4:FORQ=255TO15
57
3 Action
Games
STEP-3:POKE36876,Q:NEXT:POKE36876,0:
NEXT
750 POKEE-22,6:POKEE-1,6:POKEE+1,6:P0KE3
6878,5
760 POKE36877,129
770 FORX=1TO300:NEXT
780 POKE36878,9:POKEE-2,7:POKEE+2,7:POKE
E-23,7:POKEE-21,7:FORX=1TO300:NEXT:P
OKEE,230
790 POKE36878,12
800 POKEE-24,8:POKEE-45,9:POKEE-44,9:FOR
X=1TO200:NEXT:POKE36878,14
810 POKEE-43,9:POKEE-20,10:POKE36878,15:
FORX=1TO1999:NEXT:POKE36878,0
820 POKE198/0:POKE36869,240:PRINT"{CLR}
{7 DOWN}{4 RIGHT}PLAY AGAIN
{2 SPACES}£B%{3 LEFT}";
830 INPUTA$:IF LEFT?(A$,1)="Y"THEN CLR:GO
TO 110
840 POKE36879,27:PRINT"{CLR}"
850 PRINT"{BLU}{HOME}{11 DOWN}{2 RIGHTjT
HANKS FOR PLAYING":END
58
— ERRATA SHEET —
COMPUTERS Firet Book of VIC Games
Richthofen's Revenge
Corrections: page 60
Marc Sugiyama
Todd Koumrian
Chris Metcalf
At last, an all machine language game that you can type into
your VIC-20 home computer. The program requires a joystick,
but no memory expanders. You do need either a cassette or
disk drive. If you are using a cassette drive, have two blank
cassettes handy. Disk drive owners, you will need at least 82
blocks free on your game disk.
TnG Proflrsms
"Richthofen's Revenge" is divided into several loader pro
grams. These are "MEMDAIA $1100" through "MEMDAIA
$1900," "DATA LOADER/CLOADER," "LANDSCAPE DAIA,"
and "CHARACTERS." The MEMDAIA programs create data
files on disk or tape depending on line 40 of each program.
If you are using a cassette, change line 40 in each of the
MEMDAIA programs from OPENl,8,2,"@0:name,S,W" to
OPENl,l,l,"name". Use the remark in line 40 of MEMDAIA
$1100 as a guide to changing the other MEMDAIA programs.
Be sure to use the proper name in each program.
If you study the MEMDAIA programs, you may notice
that there are 17 numbers in each line of DAIA. The first 16
are the data which represent Richthofen's Revenge. The last
number is a checksum, in this case the sum of the previous
16 numbers. By including this feature, the computer can de
termine which DATA lines contain mistyped numbers.
DATA LOADER/CLOADER reads the data disk or cassette
and stores the information in RAM. Use DAIA LOADER if
59
Action
Games
60
Action
Games
iiii^ili
61
Action
Games
62
Action
Games
31 PRINT"{UP}"LN
35 LN=LN+10:NEXT
39 PRINT"{DOWN}CREATING DATA FILE"
40 OPEN1,8,2,"@0:DATA $1100,S,W":REM FOR
CASS OPEN1,1,1,"DATA $1100"
41 RESTORE:FORI=0TO511STEP16:FORJ=ITOI+1
5:READD:PRINT#1,CHR$(D);:NEXT
42 READD:NEXT:CLOSE1:END
100 DATA 16,207,16,175,48,195,16,0,16,20
7,16,175,48,195,16,0,1346
110 DATA 16,207,16,175,16,195,16,0,16,20
7,16,175,16,195,16,0,1282
120 DATA 16,207,16,175,48,195,48,0,0,36,
215,12,219,12,215,12,1426
130 DATA 209,12,207,12,209,24,215,48,231
,24,228,48,225,48,219,36,1995
140 DATA 215,0,48,195,48,209,32,195,16,2
09,48,219,32,195,16,209,1886
150 DATA 48,219,32,195,16,209,48,219,32,
195,16,209,48,219,32,209,1946
160 DATA 16,219,48,225,32,219,16,209,48,
195,48,195,48,209,48,0,1775
170 DATA 0,169,30,133,2,169,0,192,0,240,
11,24,105,22,144,3,1244
180 DATA 230,2,24,136,208,246,133,1,164,
0,96,72,56,165,140,101,1774
190 DATA 143,101,144,133,139,138,72,162,
4,181,139,149,140,202,16,249,2112
200 DATA 165,139,41,15,133,139,104,170,1
04,96,169,0,141,19,145,141,1721
210 DATA 34,145,173,32,145,41,128,133,0,
173,17,145,41,60,5,0,1272
220 DATA 160,128,140,19,145,160,255,140,
34,145,96,165,1,133,57,165,1943
230 DATA 2,24,105,120,133,58,96,162,0,18
9,0,30,201,8,208,7,1343
240 DATA 169,0,157,0,30,240,11,201,6,240
,4,201,7,208,3,254,1731
250 DATA 0,30,189,0,31,201,8,208,7,169,0
,157,0,31,240,11,1282
260 DATA 201,6,240,4,201,7,208,3,254,0,3
1,232,208,203,96,188,2082
63
Action
Games
64
Action
Games
40 OPEN1,8,2,"@0:DATA $1300,S,W"
41 RESTORE:PORI=0TO511STEP16:FORJ=ITOI+1
5:READD:PRINT*1,CHR$(D);:NEXT
42 READD:NEXT:CLOSE1:END
100 DATA 251,24,105,21,168,185,0,27,133,
0,169,31,133,2,169,206,1624
110 DATA 133,1,32,78,19,228,0,208,6,169,
1,160,20,145,1,165,1366
120 DATA 1,56,233,22,133,1,232,224,11,20
8,231,230,251,96,160,19,2108
130 DATA 32,203,17,177,1,72,177,57,200,1
45,57,104,145,1,136,136,1660
140 DATA 192,0,208,239,200,169,0,145,1,1
69,4,145,57,96,160,2,1787
150 DATA 32,203,17,177,1,72,177,57,136,1
45,57,104,145,1,200,200,1724
160 DATA 192,21,208,239,136,169,0,145,1,
169,4,145,57,96,160,0,1742
170 DATA 152,153,0,30,153,0,31,200,208,2
47,169,4,153,0,150,153,1803
180 DATA 0,151,200,208,247,160,22,169,6,
153,228,151,136,16,250,96,2193
190 DATA 162,0,32,139,17,165,139,240,5,1
89,128,26,208,10,160,30,1650
200 DATA 72,104,136,208,251,76,105,20,18
9,0,26,133,253,189,64,26,1852
210 DATA 133,254,189,128,26,201,3,208,20
,32,139,17,164,139,192,8,1853
220 DATA 176,22,32,139,17,164,139,192,8,
176,11,144,4,201,1,208,1634
230 DATA 5,230,253,76,216,19,198,253,32,
139,17,165,139,201,8,176,2127
240 DATA 28,32,139,17,165,139,201,8,176,
11,165,254,201,1,240,13,1790
250 DATA 198,254,76,253,19,165,254,201,2
0,176,2,230,254,189,0,26,2317
260 DATA 56,229,251,240,38,201,21,176,34
,133,0,188,64,26,32,113,1802
270 DATA 17,189,192,26,208,10,177,1,201,
1,240,15,169,0,240,2,1688
280 DATA 169,1,145,1,32,203,17,169,4,145
,57,165,253,56,229,251,1897
65
Action
' Games
66
Action
Games
67
3 Action
Games
68
Action
Games 3
69
. Action
1 Games
70
Action
Games
71
Action
1 Games
65 DATA0,0,0,0,0,0,0,0:REM SPACE
70 DATA0,254,254,254,254,254,254,254:REM
BLOCK
75 DATA0,192,168,189,199,101,56,0:REM 'U
S' RIGHT
80 DATA0,0,0,0,0,0,0,0:REM UNUSED
85 DATA0,3,21,189,227,166,28,0:REM 'US'L
EFT
90 DATA0,0,0,0,0,0,0,0:REM UNUSED
95 DATA0,0,24,60,60,24,0,0:REM EXP
100 DATA0,24,0,66,66,0,24,0
105 DATA60,0,129,129,129,129,0,60
110 DATA0,0,0,0,0,0,0,0
115 DATA0,0,0,90,0,0,0,0 :REM SHOT
120 DATA0,238,170,136,232,40,170,238:REM
"SCORE:"
125 DATA0,238,170,170,170,172,170,234
130 DATA0,224,128,132,192,132,128,224
135 DATA0,171,170,170,234,170,170,171:RE
M "HIGH:"
140 DATA0,168,170,40,56,170,168,168
145 DATA0,0,0,0,0,0,0,0
150 DATA0,0,0,0,0,0,0,0
155 DATA0,0,0,0,0,0,0,0
160 DATA0,0,0,0,0,0,0,0
165 DATA0,0,0,0,0,0,0,0
170 DATA192,160,190,131,186,126,20,0
175 DATA3,5,125,193,93,126,40,0
180 DATA60,66,129,129,66,60,36,24
185 DATA-1
190 DATA0,60,126,102,102,102,126,60:REM
START OF NUMBERS
195 DATA0,28,60,124,28,28, 28,28
200 DATA0,60,126,110,14,60,112,126
205 DATA0,60,126,70,28,70,126,60
210 DATA0,14,30,54,126,126,6,6
215 DATA0,126,126,96,124,126,14,124
220 DATA0,28,62,96,124,98,126,60
225 DATA0,126,126,6,12,24,48,48
230 DATA0,60,126,102,60,102,126,60
235 DATA0,60,126,102,62,28,56,112
240 DATA-1
72
Action
Games
245 DATA235,170,170,170,202,170,170,171
:REM RICHTHOFEN'S REVENGE
250 DATA171,169,41,41,57,41,169,169
255 DATA171,42,42,42,58,42,42,43
260 DATA187,162,162,162,179,162,162,163
265 DATA169,41,42,56,56,56,40,168
270 DATA112,80,64,64,112,16,80,112
275 DATA238,168,168,168,204,168,168,174
280 DATA174,168,168,168,172,168,168,78
285 DATA174,170,168,232,234,234,170,174
290 DATA236,140,140,140,204,128,140,236
295 DATA0,238,170,170,170,236,138,138:RE
M PRESS FIRE
300 DATA0,238,136,136,206,130,130,238
305 DATA0,224,128,128,224,32,32,224
310 DATA0,235,138,138,202,139,138,138
315 DATA0,186,162,162,178,32,162,186
320 DATA-1
325 DATA40,84,66,146,64,170,84,0:REM EXP
LOSION
73
Action
Games
Enemy Aircraft
Accum.
Level Right Left Balloon Total Score
1 4 4 4 12 650
2 4 4 8 16 1650
3 4 6 10 20 2900
4 2 10 12 24 4400
5 6 6 12 24 5900
6 10 2 12 24 7400
7 8 8 8 24 9000
8 8 8 12 28 10800
9 6 10 12 28 12600
10 10 6 12 28 14400
11 4 16 8 28 16300
12 10 10 12 32 18400
13 14 6 12 32 20500
14 10 14 8 32 22700
15 12 12 12 36 25100
16 6 18 12 36 27500
17 10 18 8 36 30000
18 12 12 16 40 32600
19 16 8 16 40 35200
20 10 10 20 40 37700
21 8 18 18 44 39800
22 16 14 14 44 42750
23 12 12 20 44 45550
24 14 14 20 48 48650
25 16 16 16 48 51850
26 20 14 14 48 55100
27 16 16 20 52 58500
28 24 8 20 52 61900
29 14 24 14 52 65450
30 18 18 20 56 69150
31 14 22 20 56 72850
32 20 20 16 56 76650
33 20 20 20 60 80650
34 22 22 16 60 84750
35 26 18 16 60 88850
36 20 20 24 64 93050
37 16 26 22 64 97300
38 17 17 30 64 101350
39 17 30 17 64 105725
40 30 17 17 64 110100
74
Action
Games
You need to capture flies, but where are you? Press the joystick but
ton to find out. But don't become visible too often or you'll lose all
your energy and will have to wait for another day to be seen again.
How to Play
As the day begins, the desert stretches before you. Cactuses
grow here and there as far as the eye can see. Birds occasion
ally appear in the sky, looking for chameleons.
As a chameleon, you are invisible. To find out where you
are, press the fire button on the joystick. You will remain vis
ible as long as the fire button is pressed, but you cannot
move while you are visible.
Becoming visible takes quite a bit of energy. You have the
strength to become visible only a set number of times each
day, so don't do it too often. If you exceed the number of
times you can become visible in a day, you have to play invis
ibly until a new day begins and a new screen appears.
Use the joystick to move around the desert. You must eat
all the flies you see, avoiding the thorny cactuses and the
predatory birds. You receive points for each fly you catch, and
lose points for each cactus you hit. If you encounter a bird,
75
Action
1 Games
mammmmmmmm
76
Action
Games
160 FORX=0TO79
170 POKE(7248+X)/255-PEEK(33152+X):NEXTX
200 GETX$:IFX$=""THEN200
210 PRINT"{CLR}{3 DOWN}{2 RIGHTjENTER PL
AY OPTION:11: PRINT" {3 DOWN} {2 SPACES}
{RVS}l{OFF} KEYBOARD{2 DOWN}11
220 PRINTSPC(5)"W{DOWN}"
230 PRINT"{3 SPACESjA + S{2 SPACES}V=VIS
IBLEtDOWN}"
240 PRINTSPC(5)"Z"
250 PRINT"{2 DOWN}{2 SPACES}{RVS}2{OFF}
JOYSTICK/FIRE"
260 GETX$:IFX$=""THEN260
270 0%=VAL(X$):IFO%<1ORO%>2THEN260
300 GOSUB4000
305 C=3:L=0:S=0
310 L=L+1:GOSUB1000
400 ONO%GOTO410,430
410 IFPEEK(197)<>27THEN500
420 GOTO440
430 IF(PEEK(37137)AND32)THEN500
440 V=V-1:IFV<1THENX=3:Y=240:Z=10:GOSUB8
00:GOTO500
450 POKEM+O+A,4:FORZ=1TO20:NEXTZ:GOTO400
500 POKEM+O+A,1:J=INT(A/22):K=A-(J*22)
510 ONO%GOTO520,570
520 X=PEEK(197):IFX=33THENJ=J+1
530 IFX=17THENK=K-1
540 IFX=9THENJ=J-1
550 IFX=41THENK=K+1
560 GOTO620
570 POKE37154/127:X=PEEK(37152):POKE3715
4,255:Y=PEEK(37137)
580 IF(XAND128)=0THENK=K+1
590 IF(YAND16)=0THENK=K-1
600 IF(YAND4)=0THENJ=J-1
610 IF(YAND8)=0THENJ=J+1
615 IFJ<0THENJ=0
617 IFJ>22THENJ=22
620 IFK<0THENK=0
625 IFK>21THENK=21
630 B=(J*22)+K:IFA=BTHEN700
77
Action
Games
640 X=PEEK(M+B):ONXGOTO3100,3200,3300,31
00,3100
650 IFXO32THEN700
660 POKEM+A,32:POKEM+O+A,1:POKEM+B,4:POK
EM+O+B,1:A=B
700 H=H+1:IFI>HTHEN400
710 X=INT(RND(1)*506):Y=PEEK(M+X):IFY<>3
2THEN400
720 POKEM+X,3:POKEM+O+X,6:H=0:GOTO400
800 POKE36878,15:POKE36873+X,Y:FORW=1TOZ
:NEXTW
810 POKE36878,0;POKE36873+X,0:RETURN
900 POKE36869,240:POKE198,0:PRINT"{CLR}
{DOWN}{6 SPACES}{RVS}GAME OVER1{OFF}
II
910 IFS<0THENS=0
920 PRINT"{2 DOWN}SCORE =";S
930 PRINT"{2 DOWNJREPLAY OPTION:":PRINT"
{2 DOWN} {RVSjltOFF} REPLAY/SAME LEV
EL":PRINT"{DOWN} {RVS}2{OFF} REPLAY/
NEW LEVEL"
940 PRINT"{DOWN} {RVS}3{OFF} END GAME
{2 DOWN}":PRINT"ENTER OPTION"
950 GETX$:IFX$=""THEN950
960 X=VAL(X$):IFX<1ORX>3THEN960
970 ONXGOTO305,300
980 POKE52,T+2:POKE56,T+2:END
1000 POKE36869,255:PRINT"{CLR}"
1010 POKEM+10,C+10:POKEM+O+10,0
1020 F=(L*5)+(D*5):IFF>100THENF=100
1030 FORZ=1TOF:GOSUB2000:POKEM+X,2:POKEM
+O+X,0:NEXTZ
1040 FORZ=1TO15
1045 GOSUB2000:IF(X-22)<0ORPEEK(M+X-22)<
>32THEN1045
1047 POKEM+X,5:POKEM+X-22,1:POKEM+O+X,5:
POKEM+O+X-22,5:NEXTZ
1050 GOSUB2000:A=X:POKEM+X,4:POKEM+O+X,1
1060 I=D*3
1070 FORZ=1TOI:GOSUB2000:POKEM+X,3:POKEM
+O+X,6:NEXTZ
1080 H=0:V=150-(L*10)-(D*10):IFV<10THENV
=10
78
Action
Games
1090 I=20-(L*2)-(D*2):IFK3THENI=3
1100 RETURN
2000 X=INT(RND(1)*506)
2010 Y=PEEK(M+X)
2030 IFYO32THEN2000
2040 RETURN
3100 POKEM+0+A,4:X=1:Y=200:Z=300:GOSUB80
0:POKEM+0+A,1:S=S-5:GOTO700
3200 X=4:Y=220:Z=10:GOSUB800:S=S+1:F=F-1
:IFF=0THEN310
3210 POKEM+A,32:POKEM+O+A,1:POKEM+B,4:PO
KEM+O+B,1:A=B:GOTO700
3300 POKEM+O+A,4:X=l:Y=150:Z=600:GOSUB80
0:C=C-1:IFC=0THEN900
3310 POKEM+O+A,1:POKEM+10,C+10:GOTO310
4000 PRINT"{CLR}{3 DOWN}{2 RIGHT}ENTER S
KILL LEVEL:11:PRINT" {3 DOWN}
{2 SPACES}{RVS}1{OFF} BEGINNER
{3 DOWN}":PRINT"{4 SPACES}TO
{3 DOWN}"
4010 PRINT"{2 SPACES}{RVS}9{OFF} ADVANCE
D"
4020 GETX$:IFX$=""THEN4020
4030 D=VAL(X$):IFD<1ORD>9THEN4020
4040 RETURN
6000 PRINT"{3 DOWN}EAT ALL THE FLIES BUT
AVOID THE BIRDS AND{3 SPACES}THE C
ACTUS."
6010 PRINT"{DOWN}+l FOR EACH FLY
{5 SPACES}{RIGHT} -5 FOR EACH CACTU
S{5 SPACES}3 CHAMELEONS PER GAME";
6020 PRINT"{DOWN}THE FIRE/V KEY MAKES
{2 SPACES}THE CHAMELEON VISIBLE.";
6030 PRINT"{3 DOWN}{3 SPACES}(PRESS ANY
KEY)":RETURN
10000 DATA32,0,0,0,0,0,0,0,0
10010 DATA1,0,26,90,94,120,24,24,24
10020 DATA2,0,24,24,60,90,90,90,36
10030 DATA3,0,3,68,40,32,0,0,0
10040 DATA4,24,26,60,88,26,60,88,0
10050 DATA5,24,24,24,24,24,24,24,0,-1
79
3 Action
Games
T.L. Wahl
increasing Difficulty
One of the unique features of this game is the increasing dif
ficulty factor: as the player improves his skill, the cross hairs
are gradually moved toward the top of the screen, and
quicker reflexes and improved technique are required to
destroy the falling bombs. As a reward for increasing skill, the
player earns higher point value for successive hits. In addi
tion, the player receives a higher score the sooner the falling
bomb is destroyed.
80
Action
Games 3
100 X=RND(0)
110 A=8152:B=38872:P=0:M=0:T=0:Q=0
120 PRINT"{CLR}{7 DOWN} {5 SPACESjAIR" DEF
ENSE"
130 PRINT"{2 DOWN}{5 SPACES}DO YOU NEED"
140 PRINT"{DOWN}{4 SPACES}INSTRUCTIONS?"
150 PRINT"{DOWN}{3 SPACES}TYPE 'Y1 OR 'N
81
. Action
' Games
82
Action
Games
20 6OTO100
40 L=30720:POKE650,128
50 FORW=8032TO8142STEP22:POKEW,162:POKEW
+L,0:NEXT
55 FORW=8055TO8143STEP22:POKEW,162:POKEW
+L,0:NEXT
56 FORW=8122TO8144STEP22:POKEW,160:POKEW
+L,0:NEXT
57 FORW=8164TO8178:POKEW,232:POKEW+L,5:N
EXT
58 FORW=8080TO8146STEP22:POKEW,220:POKEW
+L,0:NEXT
59 FORW=8038TO8148STEP22:POKEW,220:POKEW
+L,0:NEXT
60 FORW=8083TO8150STEP22:POKEW,220:POKEW
+L,0:NEXT
61 FORW=8031TO8163STEP22:POKEW,136:POKEW
+L,2:NEXT
62 FORW=8030TO8114STEP21:POKEW,78:POKEW+
L,2:NEXT
63 FORW=8052TO8118STEP22:POKEW,66:POKEW+
L,2:NEXT
64 FORW=8073TO8117STEP22:POKEW,66:POKEW+
L,2:NEXT
65 FORW=8094TO8116STEP22:POKEW,66:POKEW+
84
Action
Games 3
L,2:NEXT
66 FORW=8115TO8115STEP22:POKEW,66:POKEW+
L,2:NEXT
67 FORW=8136TO8114STEP22:POKEW,66:POKEW+
L,2:NEXT
68 PORW=8135TO8141:POKEW,152:POKEW+L,2:N
EXT
69 FORW=8179TO8185:POKEW,102:POKEW+L,5:N
EXT
70 POKE8160/98:POKE8160+L,0
71 FORW=8068TO8156STEP22:POKEW,162:POKEW
+L,0:NEXT:POKE8046,223:POKE8046+L,0
72 POKE8045, 233:POKE8045+L,0:FORW=8067TO
8155STEP22:POKEW,220:POKEW+L,0:NEXT
73 POKE8023,103:POKE8023+L,0
75 POKE8145,111:POKE8145+L,0:POKE8147,24
2:POKE8147+L,0:POKE8148,242:POKE8148+
L,0
76 POKE8150,114:POKE8150+L,0:FORW=8107TO
8151STEP22:POKEW,162:POKEW+L,0:NEXT
77 FORW=8108TO8152STEP22:POKEW,162:POKEW
+L,0:NEXT:POKE8086,160:POKE8086+L,0
78 FORW=8109TO8153STEP22:POKEW,162:POKEW
+L,0:NEXT:POKE8154,121:POKE8154+L,0
79 POKE8085,233:POKE8085+L,0:POKE8087,22
3:POKE8087+L,0
80 POKE7984,81:POKE7984+L,7
81 POKE7988,100:POKE7988+L,6:POKE7989,11
1:POKE7989+L,6
82 POKE7990,121:POKE7990+L,6:POKE7991,11
1:POKE7991+L,6:POKE7992,100:POKE7992+
L,6
83 POKE7944,98:POKE7944+L,6:POKE7945,121
:POKE7945+L,6:POKE7946,111:POKE7946+L
,6
84 POKE7947,100:POKE7947+L,6:RETURN
425 GOSUB40
440 FOR 1=1 TO 200:NEXT
445 G=A:H=B:Z=PEEK(A):J=PEEK(B)
530 POKEE,81:POKEF,0:IFE-22>=7680THENPOK
EE-22,32
560 IFA=EANDPEEK(197)=32THEN620
85
Action
Games
565 IFA=GTHENE=E+22:F=F+22:GOTO460
566 POKEG,Z:POKEH,J
570 E=E+22:F=F+22:PRINT"{HOME}":GOTO445
600 REM DELETE THIS LINE
760 POKEE,81:POKEE+L,2:FORI=1TO7
765 POKE36879,127
770 POKEE-1,120
780 POKEF-1,2
790 POKEE+1,120
800 POKEF+1,2
801 POKEE-(22*1),102:POKEE-(22*1)+L,2
810 FORS=1TO10:NEXTS,I
811 Y=2:K=15:GOSUB821:Y=7:GOSUB821:Y=1:K
=47:GOSUB821:Y=7:K=15:GOSUB821
812 Y=l:K=47:GOSUB821:Y-0:K=15;GOSUB821
813 FORI=1TO7:POKEE-(22*1),32:NEXT
814 FORI=1TO1000:NEXT:GOTO830
820 REM DELETE THIS LINE
821 FORI=1TO3:POKE(E-132)+I,160:POKE(E-1
32)+I+L,Y
822 POKE(E-132)-I,160:POKE(E-132)-I+L,Y:
NEXT
824 FORI=1TO3:POKE(E-l54)+1,160:POKE(E-l
54)+I+L#Y
825 POKE(E-154)-I,160:POKE(E-154)-I+L,Y:
NEXT
826 POKE36879,K:RETURN
1010 POKE36879,27:RETURN
86
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Brain
Testers 4
Andy Hayes
89
Brain
Testers
90
Brain
Testers 4
281 IFA=4THENPRINT"{7 RIGHT}{4 SPACES}NM
NMNMNM"
282 IPA=3THENPRINT"{HOME}{17 DOWN}
{7 RIGHT}{6 SPACES}UIUIUI"
283 IFA=3THENPRINT"{7 RIGHT]16 SPACES}JK
JKJK"
284 IFA=3THENPRINT"{7 RIGHT}{6 SPACES}PO
POPO"
285 IFA=3THENPRINT"{7 RIGHT}{6 SPACES}NM
NMNM"
286 IFA=2THENPRINT"{HOME}{17 DOWN}
{7 RIGHT}{8 SPACES}UIUI"
287 IFA=2THENPRINT"{7 RIGHT}{8 SPACESjJK
JK"
288 IFA=2THENPRINT"{7 RIGHT}{8 SPACESjPO
PO"
289 IFA=2THENPRINT"{7 RIGHT}{8 SPACES}NM
NM"
290 IFA=1THENPRINT"{HOME}{17 DOWN}
{7 RIGHT}{10 SPACES}UI"
291 IFA=1THENPRINT"{7 RIGHT}{10 SPACES}J
K"
292 IFA=1THENPRINT"{7 RIGHT}{10 SPACESjP
0"
293 IFA=1THENPRINT"{7 RIGHT}{10 SPACES}N
M"
294 IFA=0THENPRINT"{HOME}{17 DOWN}
{7 RIGHT}{12 SPACES}"
295 IFA=0THENPRINT"{7 RIGHT}{12 SPACES}"
296 IFA=0THENPRINT"{7 RIGHT}{12 SPACES}"
297 IFA=0THENPRINT"{7 RIGHT}{12 SPACES}"
:GOTO3000
299 PRINT"{HOME}LEV.{RVS}"LV
322 IFO=10THENLV=LV+1:GOTO2000
350 LETS=LV*2
355 0=0+1
360 B=INT(RND(1)*S)+1
370 C=INT(RND(1)*9)+1
375 PRINTLEFT$(CS$/23)"{RVS}{PUR}SCORE-"
SC"{WHT}"
380 PRINTLEFT$(CS$,5)"{9 RIGHT}"B"{LEFT}
{2 SPACES}"
91
4 Brain
Testers
390 IFB<10THENPRINTLEFT$(CS$,7)"
{8 RIGHT}X"C"{LEFT}{2 SPACES}":G0T04
00
393 IFB<100THENPRINTLEFT$(CS$,7)"
{8 RIGHTjX "C"{LEFT}{2 SPACES}":GOTO
400
396 IFB<1000THENPRINTLEFT?(CS$,7 ) "
{8 RIGHT}X{2 SPACES}"C"{LEFT}
{2 SPACES}":GOTO400
400 PRINTLEFT$(CS$,8)"{8 RIGHT}
******•■
■in
Haw good is your memory? This memory game is easy at first and
becomes progressively more difficult.
It takes only one mistake to end the game with "Copy Cat."
94
Brain
Testers 4
95
4 Brain
Testers
100 LF=LF+1:IFLF=100THEN2000
110 L%(LF)=INT(RND(1)*4)
120 FORLL=1TOLF:S=L%(LL):Q=160:GOSUB1000
130 FORT=1TO300:NEXT:Q=32:GOSUB1000:P0KE3
6878,0:FORT=1TO200:NEXT:NEXT
135 FORLG=1TOLF:TA=TI
140 GETA$:A=VAL(A$)-1:IFTI-TA>200THENS=L%
(LG):GOTO160
150 S=A:IFA=-1ORA>3THEN140
152 LF$=STR$(LF)
160 Q=160:GOSUB1000:FORT=1TO200:NEXT:Q=32
:GOSUB1000:POKE36878,0
162 IFA=L%(LG)THENFORT=1TO50:NEXT:NEXT
165 IFLG=LF+1THENPRINT"{HOME}{15 DOWN}
{WHT}"TAB(14-LEN(LF$))RIGHT$(LF$,LEN
(LF$)-1):GOTO99
170 PRINT"{HOME}{2 DOWN}"TAB(9)"{YEL}MISS
":POKE36878,15:POKE36875,128:R=R+1:F
ORT=1TO400:GETA$:NEXT
175 IFR=3THENFORT=1TO100:NEXT:GOTO2000
180 FORT=1TO600:NEXT:PRINT"{HOME}{2 DOWN}
{13 SPACES}":POKE36878,0:FORT=1TO500
: NEXT
190 GOTO120
1000 POKESC+201+5*S,Q:POKESC+202+5*S,Q:PO
KESC+223+5*S,Q:POKESC+224+5*S,Q
1010 POKE36878,15:POKE36875,7*S+217:RETUR
N
2000 PRINT"{HOME}{16 DOWN}{WHT}{5 SPACES}
*GAME OVER*":PRINT"{DOWN}{4 SPACES}
TO PLAY AGAIN":POKE36878#0
2005 PRINT"{5 SPACES}PRESS SPACE":PRINT1
{2 DOWN} PRESS 'CTRL' TO STOP1
2010 GETA$:IFA$=" "THENRUN40
2020 IFPEEK(653)>3THENEND
2030 GOTO2010
96
Brain
Testers 4
Tim Parker
This strategy game will run on the VIC with any memory
configuration.
Playing Outpost
When playing, the computer will give you a "Weapon"
prompt. This requires an input of T(orpedo), M(ain), or
97
Brain
3 Testers
98
Brain
Testers 4
Strategy
The light ships are the most easily destroyed, but they do the
least damage to you. If a heavy ship appears, try to get it
fast. If an enemy gets within two moves of you, hit it hard. If
it lands on you, you are destroyed. Also, protect your supply
ships. They are needed and they are easily destroyed by the
enemy.
The Program
The program is divided into several blocks:
lines 10-210 Control section
1000-1990 Screen display
2000-2030 Refuel routine
3000-3400 Enemy movement
4000-4210 Enemy fire
5000-5400 Enemy ship and supply ship appearances
6000-6580 Weapons and firing routine
9500-9630 Destroyed routine
When RUN, the program loops through each section, begin
ning with your fire routine, enemy fire and movement, new
ships, and the screen routine. This is controlled by line 200.
The odds of a ship appearing are given in lines 5005 and
5010. The four ships are listed as subscripts of ET(x), with a
value of one for light, two for medium, and three for heavy
ships. ET(5) is the supply ship, and has a value of five if one
is on the screen, and zero otherwise. EH(x) is the ship's hit
probability, given by line 40, and ED(x) is the distance, given
in line 30. To change the difficulty level of the game, change
99
4 Brain
Testers
100
Brain
Testers 4
101
4 Brain
Testers
3200 IF EX(G)>6THENEX(G)=EX(G)-1
3210 IF EX(G)<6THENEX(G)=EX(G)+1
3220 IFEY(G)<6THENEY(G)=EY(G)+1
3230 IFEY(G)>6THENEY(G)=EY(G)-1
3240 IFET(5)=5ANDEY(5)=6ANDEX(5)=6THENG0
SUB2000
3250 IFEY(G)=6ANDEX(G)=6THEN9500
3265 IFG<5ANDEX(G)=EX(5)ANDEY(G)=EY(5)TH
ENET(5)=0:EX(5)=0:EY(5)=0
3300 ED(G)=FNB(1)
3330 EH(G)=FNC(0):IFEH(G)>99THENEH(G)=99
3400 GOTO3010
4000 PRINT"{OP}ENEMY FIRING & MOVING"
4010 FORG=1TO4:IFET(G)O0THEN4100
4020 NEXTG:RETURN
4100 IFFNA(99)>(EE(G)+FNA(30))OREE(G)<10
THEN4020
4110 E=E-FNA(5)*ET(G)
4150 EE(G)=EE(G)-FNA(10)
4160 IFFNA(10)=1THENC=C-FNA(25):IFC<1THE
N9500
4170 IFFNA(10)=1THENM=M-FNA(25):IFM<0THE
NM=0
4180 IFFNA(10)=1THENS=S-FNA(25):IFS<0THE
NS=0
4200 IFE<0THEN9500
4210 GOTO4020
5000 G=FNA(5)
5005 IFG=5ANDET(5)=0ANDFNA(4)>1THENET(5)
=5:GOTO5160
5010 IFG=5ORET(G)<>0ORFNA(9)>4THEN5400
5110 A=4-INT(LOG(FNA(50)+2))
5120 ET(G)=A:EE(G)=99
5160 EX(G)=FNA(11)
5170 EY(G)=FNA(11)
5180 A=FNA(4):IFA=1THENEY(G)=1
5190 IFA=2THENEY(G)=11
5200 IFA=3THENEX(G)=11
5210 IFA=4THENEX(G)=1
5300 ED(G)=FNB(1)
5320 EH(G)=FNC(0):IFEH(G)>99THENEH(G)=99
5400 RETURN
102
Brain
Testers 4
103
4 Brain
Testers
104
Brain
Testers 4
C.G. McGaffin
This game of reasoning, logic, and luck will prove challenging to all
age levels.
The Clues
Clues are given using the symbols • (a black disk), o (a
white disk), ox a blank space. The computer will display one
black disk for each digit in the player's guess which is identi-
105
4 Brain
Testers
A Sample
The following screen display illustrates the play of the game:
2 1 357 •o
3 9 237
4 1 540 •oo
5 1 605 • •o
TRY 6
Can you deduce what the hidden code is from the avail
able information? One of the digits 2, 4, 6, or 8 is correct
106
Brain
Testers
based on the clue resulting from the first guess. The second
guess resulted in clues which state that one digit is correct
and in the right code number position and one other digit is
correct but not correctly positioned. The third guess is very
helpful since the digits 2, 3, 7, and 9 have been eliminated
from further play. What would your guess be for TRY 6? The
correct answer is given at the end of this article.
Only four more chances remain to figure out the secret code.
Crunching
The initial version of Cryptic Numbers was "crunched"
(packed into memory) after it was operating to see how much
the program's memory requirements could be reduced. The
effort was well worth it. Since I now had more memory avail
able, I made other revisions, adding some musical output, ex
planatory screen displays, and the ability to correct any of the
digits being input in the current guess.
The program will run on a 5K or 8K system with no
modification. Memory addresses found in lines 16, 51,
105, 106, and 108 must be changed to run the program on
larger systems.
The Solution: For those of you who did not figure out the solu
tion to the sample here, it is — 1085.
107
Brain
Testers
108
Brain
Testers 4
28 NEXT
29 FORJ=0TO3:IFCG(J)<0THEN33
30 FORL=0TO3:IFCG(J)<>AC(L)THEN32
31 CG(J)=-CG(J):AC(L)=-AC(L):W=W+1:GOTO33
32 NEXTL
33 NEXTJ
34 FORJ=0TO3:AC(J)=AB(J):NEXT
36 GS«GS+17:GC=GC+17:IFB=0THEN38
37 FORJ=1TOB:POKEGS+J-1,81:POKEGC+J-1, 0 :N
EXT
38 IFW=0THEN40
39 FORJ=1TOW:POKEGS+B+J-1,87:POKEGC+B+J-1
,0:NEXT
40 GS=GS+5:GC=GC+5:IFB=4THEN51
41 FORJ=19TO21:POKEGS-J,32:POKEGC-J,1:NEX
T:IFNG=9THEN45
42 POKEGS+1,20:POKEGC+1,6:POKEGS+2,18:POK
EGC+2,6: POKEGS+3, 25: POKEGC+3,6
43 NL=NL+1:POKEGS+5,NL:POKEGC+5,6
44 IFNL=57THENNL=47
45 NG=NG+1:POKEV,15
48 FORJ=1TO30:POKES1#183:NEXT
49 POKESl^rPOKEV^
50 IFNG<10THEN20
51 MS=7724:MC=38444:L=0
52 FORM=7TO13STEP2:N=AC(L)+2
53 POKEMS+M,S(N-2):POKEMC+M,C(N-2):L=L+1:
NEXT
54 IFNG<10THENGOSUB72
56 M$="NICE JOB1{2 SPACESjTRY AGAIN1
{SHIFT-SPACE}"
57 IFNG=10THENM?="{3 SPACES}SORRY TRY AGA
IN{4 SPACES}11
58 MS=MS+264:MC=MC+264
59 GOSUB70
60 M$="{2 SPACES}TYPE AN E TO EXIT
{3 SPACES}"
61 MS=MS+22:MC=MC+22
62 GOSUB70
63 M$="OR C TO CONTINUE PLAY "
64 MS=MS+22:MC=MC+22
65 GOSUB70
109
Brain
Testers
66 GETA$:IFA$=""THEN66
67 IFA$=CHR$(67)THEN2
68 IFA$<>CHR$(69)THEN66
69 GOTO79
70 FORJ=0TO21:C$=MID$(M$,J+1,1):N=ASC(C$)
-64:IFN<0THENN=N+64
71 POKEMS+J,N:POKEMC+J,2:NEXT:RETURN
72 POKEV,15:FORL=250TO230STEP-2:POKES1,L
73 FORM=1TO110:NEXTM
74 NEXTL
75 FORL=232TO250STEP2:POKES1,L
76 FORM=1TO85:NEXTM
77 NEXTL:POKEV,0:POKES1,0:RETURN
78 DATA4,48,0,49,3,50,2,51,3,52,4,53,5,54
,6,55,7,56,2,57
79 POKESC27
80 PRINT"{CLR}"
81 END
82 PRINT"{CLR}*EACH GUESS IS MADE UPOF FO
UR DIGITS.{7 SPACES}":PRINT"*THE DIGI
TS 0 TO 9 MAY";
83 PRINT"BE USED IN ANY COMBIN-ATION AND
SEQUENCE.{3 SPACES}":PRINT"*DIGITS MA
Y BE CORREC-";
84 PRINT"TED BY DELETING (DEL{2 SPACES}KE
Y) AND RETYPING.":PRINT:PRINT"*A RETU
RN MUST FOLLOW"
85 PRINT"EACH FOUR DIGIT GUESS.":PRINT"*V
IC COMPARES THE CODEWITH EACH GUESS A
ND"
86 PRINT"GIVES CLUES TO HELP{3 SPACES}YOU
BREAK THE CODE."
87 PRINT:PRINT:PRINT"**TYPE C TO CONTINUE
**"
90 GETA$:IFA$=""THEN90
91 IFA$<>CHR$(67)THEN90
92 PRINT"{CLR}*VIC PRINTS UP TO FOURSYMBO
LIC CLUES AFTER{2 SPACES}EACH GUESS D
EPENDING"
93 PRINT"ON THE NUMBER OF COR- RECT DIGIT
S IN EACH{3 SPACES}GUESS.":PRINT
94 PRINT"Q IS PRINTED FOR EACH CORRECT DI
110
Brain
Testers 4
HI
4 Brain
Testers
Screen compatibility
The expander gave us enough memory, but it didn't solve the
screen compatibility problem. The original program was writ
ten for a 40-column screen; VIC's screen is 22 columns wide.
112
Brain
Testers 4
113
Brain
testers
114
Brain
Testers 4
115
Brain
Testers
930 G=17:GOSUB1700:PRINT:PRINT"{UP}"TAB(
12);:PRINT"{PUR}{RVS}{2 SPACES}SCORE
{2 SPACES}":PRINTTAB(12);"EJ8
{7 SPACES}gL3"
940 PRINTTAB(12);"gJ3{3 SPACES}0
{3 SPACES}gL3"
950 PRINTTAB(12);"gja{7 SPACES}&L3"
951 PRINTTAB(12);"B9 U|":PRINT"{HOME}"
960 G=2:GOSUB1700:PRINT"{9 SPACES}"
970 WP=WP+1:IFWP>WTHEN1450
980 Q=LEN(W$(WP))-1
1000 GOSUB1700:PRINTTAB(15-(Q/2));LEFT$(
W$(WP),Q):TI$="000000"
1020 G=4:GOSUB1700:PRINTTAB(15);"{BLU}LO
C."
1025 PRINTTAB(15)"{GRN}ROW{BLK}#{RED}COL
116
Brain
Testers 4
1030 FORG=6TO11:GOSUB1700:
1040 PRINT"{5 SPACES}":NEXTG:G=6:GOSUB1700
1050 B$="":GETB$:IFB$=""THEN1050
1060 IF ASC(B$)=13THEN1050
1070 PRINTB$;",";:IFB$="0"THENB=0:GOTO10
90
1080 B=VAL(B$):IFB<10RB>9THENPRINT"
{2 LEFT}{2 SPACES}{2 LEFT}";:GOTO10
50
1090 A$="":GETA$:IFA$=""THEN1090
1100 IF ASC(A$)=13THEN1090
1110 PRINTA$:IFA$="0"THENA=0:GOTO1140
1120 A=VAL(A$):IFA<1ORA>9THEN1030
1140 G=7:GOSUB1700:PRINT"DIR:":PRINT:PRI
NTTAB(15);" {LEFT}";
1150 GETD$:IFD$=""THEN1150
1160 IF ASC(D$)=13THEN1150
1170 PRINT"{UP}{RIGHT}";D$:D=VAL(D$):IFD
<1ORD>8THEN1140
1190 WT=TI:IFB<>L(WP,2)THEN1230
1200 IF A<>L(WP,1)THEN1230
1210 IF D=L(WP,3)THEN1360
1230 X=A+1:Y=B+1:G=LEN(W$(WP))-1:IFM(Y,X
)<>ASC(LEFT$(W$(WP),1))THEN1300
1240 X9=0:FORN=2TOG:GOSUB1550:IF X<10RX>
10THEN1270
1250 IF Y<1 OR Y>10 THEN1270
1260 IF M(Y,X)=ASC(MID$(W$(WP),N,1))THEN
1280
1270 X9=1:N=G
1280 NEXTN:IF X9=0THEN 1360
1300' G=6:GOSUB 1700:PRINTSPC(0);:B$=STR$
(L(WP#2)):A$=STR$(L(WP,1))
1310 PRINTRIGHT$(B$,LEN(B$)-1);'\ ";RIGHT
$(A$,LEN(A$)-1)
1320 G=8:GOSUB1700:PRINT SPC(1);L(WP,3)
1330 G=10:GOSUB 1700:PRINT"T"
1340 G=l1:GOSUB1700:PRINT"J {RVS} NO
{OFF}"
1341 G=l3:GOSUB1700:PRINT"{DOWN}HIT ANY"
:G=13:GOSUB1700:PRINT"{2 DOWN}
{2 SPACES}KEY"
117
4 Brain
Testers
1342 QW$="":GETQW$:IFQW$=""THEN1342
1343 G=10:GOSUB1700:PRINT" "
1344 G=11:GOSUB1700:PRINT"{5 SPACES}"
1345 G=l3:GOSUB1700:PRINT"{DOWN}
{7 SPACES}":G=l3:GOSUB1700:PRINT"
{2 DOWN}{5 SPACES}"
1350 GOTO 1420
1360 IF WT<(SL*60)THENWS=100:GOTO1390
1370 IF WT<(SL*1200)THENWS=10:GOTO1390
1380 WS=5+INT((SL*1200)-WT)/60)
1390 G=10:GOSUB1700:PRINT"t"
1400 G=l1:GOSUB1700:PRINT"{RVS}Y{OFF},
{LEFT}"WS:TS=TS+WS
1420 G=17+2:GOSUB1700:PRINT TS
1430 GOTO 960
1450 PRINT"{HOME}{15 DOWN}"
1460 FORX=1TO6:PRINT"{12 SPACES}":NEXTX
1470 FORG=-2TO14:GOSUB1700
1480 PRINT"{22 SPACES}":NEXTG
1490 FORX=1TO1500:NEXTX:PRINT"{CLR}"
1491 POKE36879,76
1492 PRINT"{HOME}{8 DOWN}{YEL}DO YOU WIS
H TO PLAY{3 SPACES}{DOWN}ANOTHER GA
ME? IF YOU{2 SPACES}{DOWN}DO ENTER
Y FOR YES."
1493 PRINT"{DOWN}IF YOU DON'T ENTER N
{2 SPACES}{DOWN}FOR NO.
1500 R$="":GETR$:IFR$=""THEN1500
1505 IFR$="N"THEN1520
1510 IF R$="Y"THEN90
1515 IFR$o"N"ANDR$<>"Y"THEN1500
1520 PRINT"{CLR}":POKE36879,42
1525 PRINT"{HOME}{7 DOWN}{CYN}THANK YOU
FOR PLAYING {DOWN}{YEL}WORD HUNT
{CYN}. HOPE YOU(3 SPACES}{DOWN}HAD FUN.
1530 PRINT"{2 DOWN}{6 RIGHT}{GRN}SEE YOU
LATER111"
1535 FORX=1TO5000:NEXTX:PRINT"{CLR}":POK
E36879,110
1540 PRINT"{HOME}{10 DOWN}{CYN}
{4 SPACESjEND OF PROGRAM":FORI=1 TO
1000:NEXT I
118
Brain
Testers a
119
Brain
Testers
LOSt FOX
Warren Pugh
"Lost Vox" is a fun game even young children will enjoy. It, like
other programs in this book, uses a technique called chaining to fit
into an Unexpanded VIC. Be sure to S/ti/E Program 47 immediately
following Program 4-6 on the same tape.
NW NE
W you E
SW SE
When you find Silky, the tired fox will be glad to see
you. Silky didn't know how tough life could be outside the
safe walls of the zoo. Getting back to plenty of good food, a
nice warm place to sleep, and plenty of friendly people to
perform for — that'll be worth getting a few shots from the
vet, after all.
120
Brain
Testers
How to Play
Levels of difficulty. At the beginning of the game, before
you begin your search for the lost fox, you will be asked
what level of difficulty you want. 1 is the easiest level, and 8
is the hardest.
Where is Silky? When the game begins, Silky is hidden
randomly somewhere in the city. At the easier levels of play,
Silky stays in the same place. At the harder levels, the fox
moves around.
What you see. The TV screen shows you an aerial view
of the city, looking down on the streets and the city blocks.
You will start from a position in the center of the city. You
have at most 30 moves in which to find Silky.
How to move. You can move by pressing N for north, S
for south, E for east, and W for west.
Radio signals. Every three moves (or every four or five, if
you chose higher difficulty levels) you will get a reading from
Silky's radio transmitter, telling you approximately what direc
tion the fox is from where you are. But don't count on getting
a signal every time — sometimes you might have a building
or a bridge in the way, blocking out the radio reception.
Roadblocks. Also, beware of places where the road is
blocked by construction or traffic jams or large trucks unload-
121
Brain
Testers
ing — it's easy to get boxed in there and waste a lot of your
turns getting out again. There are more roadblocks at higher
difficulty levels.
Getting closer. When you get within three spaces of
Silky, you'll have to start searching on foot. On the screen,
you'll know when this happens because the car will be re
placed by a human figure. Once you're out of the car, you
don't have to stay on the road anymore — you can make your
way right through the city blocks.
Found! When you reach Silky, the fox will come out of
hiding and a fanfare will sound. In the meantime, the game
will reset itself so you can play again, if you want.
Even harder levels. Besides levels 1 to 8, there is a level 9
in which you can program your own obstacles.
122
Brain
Testers 4
^ print"{down}{6 spaces}{rvs}n{off}- no
rth{down}{8 left}{rvs}s{off}- south
{down}{8 left}{rvs}e{off}- east{down}
{7 left}{rvs}w{off}- west{down}"
2® print" you cannot leave the roadway u
ntil you get close enough. once you";
2§ print"get the 'out of car1{2 spaces}m
essage, then you may move anywherei"
25* print" {down} beware of roadblocks i ";
236 print"{down} hit {rvs}return{off} to
GO ON.";
GETA? : IFA$=" "THEN^i //
PRINT"{CLR}":POKE36879,253
PRINT"{BLK}{8 DOWN}{3 RIGHT}{RED}PLE
ASE WAIT FOR {DOWN}{6 SPACES}PROGRAM
TO LOAD."
PRINT"{BLU}{4 DOWN}"
\C 2£8 POKE198,1:POKE631,131:END
17 l^^l POKEV ,15: READNS, DS: I FNS=-1THENPOKEV
,0:RETURN
\<i <3tfQ0 POKESS+1,NS:POKESS+2,NS:FORT=1TODS*
100:NEXT:POKESS+1,0:POKESS+2,0
FORT=1TO20:NEXT:GOTOifflUt / 7
DATA223,1,230,1,234,1,223,1,230,1,2
34,1,223,1,230,1,234,1,0,4
.21 W& DATA231,2,230,1,0,2,230,2,227,1,0,2
,227,2,223,4,-1,0
POKE51,0:POKE52,28:POKE55,0:POKE56,
28:CB=7168
26 lJa40 DATA0,255,255,255,255,255,255,255,2
55
DATA30,68,56,56,16,57,58,60,40
DATA35,84,124,84,16,56,126,127,36
DATA36,16,40,16,124,16,40,68,68
DATA32,0,0,0,0,0,0,0,0
DATA-1
123
Brain
Testers
124
Brain,
"Testers1
RH=10:CH=10:LH=7724+(22*(RH)+CH):POK
ELH,H:POKELH+OF,2:NRH=10:NCH=10
GOSUB11&&:"l FRC < T 2 THENGOTflHii/ K
37 tt>0 RF=INT(RND(1)*20) :CF=INT(RND(l)*21)
n $<% <m% LF=7724+(22*(RF)+CF):IF LF=LHTHEN:«i#
GOSUBI0%
PRINT"{HOME}{12 RIGHT}{RVS}{BLK}TIME
fl 100 GETA$
bf^ 210 IFA$="N"THEN NR=RH-1
^3 .21?- IFA$="S"THEN NR=RH+1
W 213 IFA$="E"THEN NC=CH+1
¥5 217 IFA$="W"THEN NC=CH-1
4(5-218 IFPEEK(197)=39THEJSf31f -
Y> 220 IFNC<0THENCH=0:NC=0:GOTO§10 ^'
IFNC>21THENCH=21:NC=21:GOTO20i( -
IFNR<0THENR=0:NR#
si 230 NL=7724+(22*(NR)+NC)
?i23S IFNL=LFTHEN3ji0
5^ 23S IFA$=""THEN2ai
?f 231 IFCO0THEN100 "-
S9 t3f IFPEEK(NL)<>0THENNR=RH:NC=CH:G©TO21I0
96 3@0 POKELH,SC:POKELH+OF,SL
r7 ^05 SC=PEEK(NL):SL=PEEK(NL+OF)
f% 3-10 POKENL,H:POKENL+OF,2
?<f 311 TT=TT+1:TC=TC+1
6^312 PRINT"{HOME}{12 RIGHT}{RVS}{BLK}TIME
="TT"{BLU}"
U 31S POKEV,15:POKESS+2,230:FORT=1TO50:NEX
T:POKESS+2,0:POKEV,0
U 315 A$=""
C3 320 CH=NC:RH=NR:LH=NL
&H 350 IFLH=LFTHEN##0;
IFTC=Tl-lTHENGOStJBftli0
360 IFTC=TlTHENGOSUB#li
370 GOSUBSIPS
375 IFTT=T4THENPOKEV,15:POKESS,200:FORT=
1TO1500:NEXT:POKEV,0:POKESS,0
IFTT=T4THENPRINT"{HOME}{DOWN} {RVS}
{PUR}YOU LOSE I1{BLU}":POKELF,30:POKE
LF+OF,2:FORT=1TO8000:NEXT:©OTOf! ; :
125
4 Brain
Testers
1 f S0&
?( 5#f iPRINT"{HOME}{RVS}{PUR}**READING**
{BLU}":POKEV,15:POKESS+2,220:PORT=1T
01500:NEXT:POKESS+2,0:POKEV,0
>* 501 PRINT" {HOME} {11 SPACES} " :GOSU§pp&0
7 ? 502 RK=INT (RND (1) *10): IFRK=5THEN^§§
7f 503 IFRH>RFTHENPRINT"{HOME}{RVS} NORTH
{5 RIGHT}"
75" 505 IPRH<RFTHENPRINT" {HOME} {RVS} SOUTH
{5 RIGHT}"
>6 507 ifrh=rfthenprint"{home} {wht}{rvs}
{5 RIGHT}{OFF}{BLU}{5 SPACES}"
77 510 IFCH>CFTHENPRINT"{HOME}{RVS}
{7 RIGHT}WEST"
7% 515 IFCH<CFTHENPRINT"{HOME}{RVS}
{7 RIGHT}EAST"
7? 517 IFCH=CFTHENPRINT"{H0ME}{7 RIGHT}
{WHT}{RVS}{4 RIGHT}{OFF}{BLU}"
1& S|f TC=0
$\ If! IFCO1THEN5^0&^
n 520 IFABS(CH-CF)<3ANDABS(RH-RF)<3THENCC=
1
*? 525 IFCC=lTHEN#i0-
W 527 GOTO550|
$5 if# POKEV,15:FORX=1TO5:POKESS,250:FORT=1
TO100:NEXTT:POKESS,0:FORT=1TO25:NEXT
T:NEXTX
££.§35 IFCC=1THENPRINT" {HOME} {DOWN}
{12 RIGHT}{BLK}{RVS}OUT OF CAR{BLU}"
:CC=CC+1:H=36:POKELH,H
*7 <§p RETURN
iff @00 PRINT " { HOME } { DOWN} { RED } { RVS }
{12 RIGHT}FOX FOUND1{BLU}":CC=0
tf 902 POKELF,30:POKELF+OF,6
<fO 905 QQSJJW&^i^lS'
^1 907 P0KELF,i'6
\l 910 FORT=lTO5000:NEXT:GOTOt®
^5 l;0@ POKEV, 15 :READNS,DS:IFNS=-1THENPOKEV
,0:RESTORE:RETURN
M1010 POKESS+1,NS:POKESS+2,NS:FORT=1TODS*
100:NEXT:POKESS+1,0:POKESS+2,0
126
Brain
■rasters 4
(^ /<?7l240 RETURN
O 127
Brain
Ttesters
Pharaoh's
Treasure
Clark and Kathryn H. Kidd
128
Brain
Testers 4
How to Play
The game begins at a secret tomb entrance. Remember where
you enter the pyramid, for you will have to leave by the same
opening. To move, press Fl for north, F3 for south, F5 for
east, and F7 for west. You may want to make a map of the
tomb so you will avoid backtracking as well as be able to
find your way out again.
You're looking for the Golden Sarcophagus; as soon as
you find the treasure, all you need to do to win is leave the
tomb. Any tools you find along the way will count as a
129
4 Brain
Testers
Scoring
Although the object of the treasure hunt is to escape the
tomb with the Golden Sarcophagus, scores are provided so
players may compare their skills:
500 points for entering the tomb.
500 points for finding the treasure.
500 points for escaping the tomb with the treasure.
100 points for finding a tool.
50 points for finding a peril and having the correct tool.
-100 points for getting the Pharaoh's Curse.
-25 points for finding a peril without the correct tool.
-5 points for each minute spent in the tomb.
-1 point for each turn taken.
Any player with a score of 2000 or better should be given
the respect due an expert Egyptologist.
5 DIMCP%(3,3)
10 CT%=828:Z$=CHR$(13):PRINT"{CLR}{RED}
{DOWN}WELCOME TO {2 DOWN} M
15 PRINTM{3 DOWN}"SPC(8)"{BLK}T H EIIZ$11
{3 DOWN}IISPC(2)"P H A R A O H ' S"Z$
16 PRINT" {2 DOWN}IISPC(3)IIT R E A S U R E
130
Brain
Testers 4
17 LV=36878:V1=36874:V2=36875:V3=36876
20 FORX=0TO189:READN%:POKECT%+X,N%:NEXT
25 FORX=0TO5:READX$,Y$:PT$(X)=X$:TT$(X)=
Y$:TT%(X)=0:NEXT:TU%=0
60 GOSUB600:L%=1:SC%=500:MS=TI/60:QQ%=IN
T(RND(1)*4)
62 FORX=0TO3:READX$:CP$(X)=X$:NEXT
65 GOSUB400
66 FORX=0TO3:FORY=0TO3:READX%:CP%(X, Y) =X
%:NEXT:NEXT
70 X%=((L%-1)*5)+CT%:N%=PEEK(X%):S%=PEEK
(X%+l):E%=PEEK(X%+2)
75 W%=PEEK(X%+3):P%=PEEK(X%+4):T%=0
80 IFP%>5THENT%=P%-5:P%=0
85 IFP%=0THEN125
86 IFTT%(P%-1)=2THEN125
90 PRINT"{CLR}{3 DOWN}{RED}LOOK! UP AHEA
D! —{2 DOWN}"Z$"A "PT$(P%-1)". {2 DOWN}"
95 IFTT%(P%-1)=0THEN105
100 PRINT"BUT YOU HAVE A{2 DOWN}"Z$TT$(P
%-l)"{2 DOWN}"Z$"AND MAY CONTINUE.
{BLK}":Z=0:SC%=SC%+50
103 TT%(P%-1)=2:GOTO120
105 PRINT"YOU DON'T HAVE{2 DOWN}"Z$"THE
PROPER TOOL,{2 DOWN}"Z$"SO YOU MUST
GO BACK.{BLK}"
110 L%=PL%:Z=l:SC%=SC%-25
120 GOSUB400
123 IFZ=1THENGOTO70
125 IFT%<>7ORTT%(5)=0THEN150
130 PRINT"{CLR}{GRN}{DOWN}CONGRATULATION
S1 I 111{2 DOWN}"Z$" YOU ESCAPED
{2 DOWN}"Z$"{2 SPACESjWITH THE TREAS
UREIt"
140 PRINTSPC(2)"{2 DOWN}{RVS}{RED}Y 0 U
{4 SPACESjW O N{OFF}{BLU}{2 DOWN}":S
C%=SC%+500:GOTO380
150 IFT%=0ORT%=7THEN200
155 IFTT%(T%-1)>0THEN200
160 TT%(T%-1)=1:PRINT"{CLR}{3 DOWNjLOOKt
ON THE GROUND —{DOWN}"Z$"A "TT?(T%
-1)"1{2 DOWN}"
131
Brain
Testers
132
Brain
Testers 4
128):P0KEV2,Y:P0KEV3,128:P0KEV1,Y-50
404 FORY=1TO350:NEXTY
408 NEXTX:POKELV,0
409 POKEV1,0:POKEV2,0:POKEV3,0
410 PRINT"{2 DOWN}{3 SPACES}(PRESS ANY K
EY)"
415 GETD?:IFD?=""THEN415
420 PRINT"{CLR}":RETURN
500 X%=INT(RND(1)*500+1):IFX%>2THEN201
505 SC%=SC%-100:GOSUB600
510 X%=INT(RND(1)*38+l):Y%=PEEK(((X%-1)*
5)+4+CT%)
515 IFY%<>0THEN510
520 L%=X%:PRINT"{CLR}{PUR}{DOWN}H O R R
O R S I U"Z$"{DOWN}YOU HAVE BECOME A
"Z$"{DOWN}VICTIM OF THE AWFUL"
530 PRINT"{DOWN}''PHARAOH'S CURSE''"Z$"
{DOWNjAND WILL BE BANISHED"Z$"{DOWN}
TO AN UNKNOWN PART"
540 PRINT"{DOWN}OF THE TOMBI 11{BLK}":GOS
UB400:GOTO70
600 FORX=1TO37:POKECT%+4+(X*5),0:NEXT
630 X%=INT(RND(l)*19+19):N%=(X%*5)+4+CT%
:POKEN%/11
635 FORX=1TO10
640 X%=INT(RND(1)*37+1):N%=(X%*5)+4+CT%:
S%=PEEK(N%)
645 IFS%<>0THEN640
650 POKEN%,X:NEXT:RETURN
700 Y%=CP%(QQ%,X):X$=CP$(Y%):PRINT" YOU
MAY GO "X$".":RETURN
901 DATA0,10,4,2,12,0,11,1,3,0,0,0,2,0,0
,0,9,5,1,0,0,7,6,4,0
903 DATA0,0,0,5,0,5,14,8,0,0,0,0,0,7,0,4
,16,0,10,0,1,13,9,0,0
905 DATA2,18,0,12,0,0,0,11,0,0,10,0,0,0,
0,7,0,27,15,0,0,26,14,16,0
906 DATA9,0,15,17,0,0,20,16,18,0,11,38,1
7,19,0,0,0,18,0,0,17,21,25,0,0
907 DATA20,33,0,23,0,0,23,37,38,0,22,34,
21,24,0,38,35,23,36,0,31,30,32,20,0
909 DATA15,0,28,29,0,0,0,0,14,0,0,0,0,26
133
a Brain
Testers
,0,0,0,26,0,0,25,0,0,0,0
911 DATA0,25,0,0,0,0,0,0,25,0,21,0,0,0,0
,23,0,0,0,0,24,0,0,0,0
913 DATA0,0,24,0,0,0,0,0,22,0,18,24,22,0
,0,"DEEP PIT",LOG,"QUICKSAND POOL",R
OPE
915 DATA"ROCK SLIDE",SHOVEL,"GUARDIAN CA
T","SACRED AMULET"
917 DATA"LOCKED DOOR",KEY,X,"*GOLD SARCO
PHAGUS *",NORTH,SOUTH,EAST,WEST
920 DATA0,1,2,3,1,0,3,2,2,3,1,0,3,2,0,1
134
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Scrolling
5
This game uses scrolling to create the effect of driving. It takes prac
tice to play well.
137
5 Scrolling
Program 5-1. Program 5-1 will run Program 5-2 at the proper
time. Just be sure to leave the play button pressed until Pro
gram 5-2 is running.
138
Scrolling
139
5 Scrolling
707 POKE7734+B-22,6:PQKE7734+B,7:POKEZ,D
*8:NEXT:POKE7734+B,8
720 FORT=15TO0STEP-.03:POKEZ-1,T:POKEZ-2
,143:NEXT:POKEZ,110:POKEZ-1,0
740 FORT=1TO1500:NEXT:POKEZ-10,240
750 PRINT"{CLR}{WHT}{2 DOWN} YOU WENT "I
NT(L1/23)"{LEFT} MILES":PRINT" YOU E
ARNED"INT(Q/10)"POINTS"
751 POKEZ-2#0:IFK3>0THENPRINT"{DOWN} YOU
GOT"M"MONEYBAGS"
755 PRINT"{2 DOWN} DO YOU WANT TO START
{2 SPACES}OVER {RVS}(ENTER Y IF SO.)
it
141
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Dexterity
6
Thunderbird
Dave Sanders
Fast action is what youil get when you play "Thunderbird!' Try it
and see if you're skilled enough to keep the satellite from flying past
the Thunderbird.
145
6 Dexterity
one in our neighborhood has broken out the third time. Just
in case you are a whiz though, the game will continue to get
harder.
Typing in Thunderbird
Thunderbird uses almost all the memory of the unexpanded
VIC. So, in order to get Thunderbird to fit into memory, a
technique called "crunching"' is used (see below). Thus it is
necessary, when typing in this program, to use keyword ab
breviations. These can be found in Appendix D of Personal
Computing on the VIC-20 which comes with each VIC.
146
Dexterity
6
and ready to use, you probably will not need those REM
statements any more; you can save quite a bit of space by re
moving them. If you plan to revise or study the program
structure in the future, it is a good idea to keep a copy on file
with the REM statements intact.
148
Dexterity
6
885TO38904:POKER,5:NEXT:POKE8165,J:POK
E8168,J:POKE8171,J
10 POKE8178,J:POKE8181,J:POKE8184,J:FORR
=7987TO8141STEP22:POKER+OF,1:NEXT:FOR
R=7680TO8164STEP22
11 READA:POKER,A:NEXT:FORR=7701TO8185STE
P22:READA:POKER,A:NEXT:FORR=7681TO770
0:READA:POKER,A:NEXT
12 FORR=7966TO8120STEP22:POKER+OF,1:NEXT
:RESTORE:IFP1=>2THEN50
13 PRINTSPC(6)"{RVS}{WHT}{22 UP}"SC:POKE
7686,189:PRINTSPC(14)"{RVS}{WHT}{UP}"
HI:POKE7694,189
14 X=l:Y=l:DX=1:DY=1:POKEM+1,85:POKEM+2,
88:POKEM+3,73:IFRS=1THENRS=RS+1:GOTO5
5
15 IFTT=500THENTT=1:X=l2:L=l:SC=0:PRINT"
{HOME}{7 RIGHT}{RVS}{5 SPACES}":GOTO1
04
16 IFLO2THEN104
17 POKE7767,147:POKE7789,133:POKE7811,13
1:POKE7833,143:POKE7855,142:POKE7877,
132:GOTO104
25 PRINTSPC(6)"{UP}{RVS}"SC:POKE7686,189
:IFSOHITHENHI=SC:PRINTSPC(14) "{RVS}
{UP}"HI:POKE7694,189
26 RETURN
50 FORR=7945TO7964:POKER,G:NEXT:POKE8059
,J:POKE8070,J:FORR=7945TO7964:POKER+O
F,7:NEXT
51 IFP1=>3THENPOKE8012,J:POKE8029,J
52 IFP1=>4THENPOKE8105,J:POKE8112,J
53 IFP1=>5THENPOKE7951,J:POKE7958,J
54 GOTO13
55 POKE7754,8:POKE7755,9:POKE7756,20:POK
E7799,153:POKE7840,20:POKE7841,15:POK
E7843,16:POKE7844,12
56 POKE7845,1:POKE7846,25:POKEM+1,85:POK
EM+2,88:POKEM+3,73:POKE7 783,42:POKE79
03,21:POKE7904,19:POKE7905,5
57 POKE7907,3:POKE7908,21:POKE7909,18:PO
KE7910,19:POKE7911,15:POKE7912,18:POK
149
6 Dexterity
E7914,11:POKE7915,5
58 POKE7916,25:POKE7917,19:POKE7925,6:PO
KE7926,15:POKE7927/18:POKE7929,18:POK
E7930,9:POKE7931,7
59 POKE7932,8:POKE7933,20:POKE7935,38:PO
KE7937,12;POKE7938,5:POKE7939,6:POKE7
940,20
60 GETA$:IFA$="Y"THENSC=0:L=1:GOTO4
61 IFA$<>="Y"THENPOKEVA,0:TT=TT+1:IFTT=5
00THEN4
62 GOTO60
65 SC=SC-F:G=M+2:IFHI=SC+FTHENHI=HI-F
66 POKEG+22,77:POKEC, 10:POKEG+OF+22,1:G=
G+22
67 IFPEEK(G+22)=81ORPEEK(G+22)=65THENPOK
EG,81:POKEG+OF,9:GOTO7 2
68 IFPEEK(G+22)=87THENPOKEG,81:POKEG-22,
81:G=G-2 2:POKEG+OF,9:POKEG+OX,9:GOTO7
4
69 IFG>8185THENPOKEG, 81: POKEG+OF, 9 :GOTO7
2
70 IFPEEK(G)=77THENPOKEG+22,78:POKEG+22+
OF,1:G=G+22:GOTO67
71 GOTO66
72 IFPEEK(G-1)=32THENPOKEG-1,81:POKEG-1+
OF, 9
73 IFPEEK(G+l)=32THENPOKEG+1,81:POKEG+1+
OF, 9
74 POKEG-22,32:G=G-22:IFPEEK(G-22)=88THE
N76
75 GOTO74
76 FORR=255TO128STEP-.9:POKEVA,R:NEXT:PO
KEVA,0
77 X=INT(RND(1)*18)+1:DY=1:Y=l:DX=1:IFX=
>11THENDX=-DX
78 IFX=<12THENDX=+DX
79 IFDX=>50THENDX=1
80 GOSUB25:FORR=1TO750:POKEC,105:GOTO105
85 POKEBD,91:POKEBD,90:DX=+DX:DY=-DY:POK
EBD,91:GOSUB25:POKEBD,32:GOTO105
90 FORR=1TO15:FORW=250TO240STEP-1:POKEVA
,W:NEXT:FORW=240TO250:POKEVA,W:NEXT:P
150
Dexterity
6
OKEVA,0:NEXT:P1=P1+1
91 FORR=1TO100:SC=SC+10 s POKEVA,245:GOSUB
25:FORW=1TO10:NEXT:POKEVA,0:NEXT:GOTO
4
95 IFL>1THENP1=1:FORR=0TO255:POKEC,R:POK
EVA,INT(RND(0)*128+127):NEXT:POKEC,10
5:POKEVA,0:GOTO55
96 IFL<3THENL=L+K:POKE7767,147:POKE7789,
133:POKE7811,131:POKE7833,143:POKE785
5,142:POKE7877,132:X=17
97 DX=1:Y=l:DY=1:POKEC,47:FORR=1TO28:REA
DA:POKEVA,A:POKEC,A:FORW=1TO50:NEXTW,
R
98 POKEVA,0:RESTORE:POKEC,105:DX=-DX:DY=
+DY:GOTO104
100 IFM<7703THEN104
101 POKEM,85:POKEM+1,88:POKEM+2,73:POKEM
+3,32:M=M-1:GOTO104
102 IFM>7718THEN104
103 POKEM+2,85:POKEM+3,88:POKEM+4,73:POK
EM+1,32:M=M+1
104 POKEBO,32:BO=7703+X+22*Y:POKEBO,42
105 X=X+DX:IFX=0ORX=19THENDX=-DX:POKEVA,
240
106 Y=Y+DY:IFY=-1THEN95
107 IFY=22THEN90
108 IFDX=0THENDX=1
109 POKEVA,0:POKEVD,0:BD=7703+X+22*Y
110 IFPEEK(BD)=32THEN116
111 POKEBO,32:IFPEEK(BD)=JTHEN65
112 IFPEEK(BD)=81THENPOKEVA,238:POKEVD,2
38:SC=SC+50:GOTO85
113 IFPEEK(BD)=65THENSC=SC+200:FORR=128T
O255STEP2:POKE36875,R:NEXT:POKE36875
,0:GOTO85
114 IFPEEK(BD)=85ORPEEK(BD)=73THENPOKEVA
,140:SC=SC+7 5:GOSUB2 5;DX=+DX:DY=-DY:
GOTO105
115 IFPEEK(BD)=88THENPOKEVA,212:SC=SC+25
:GOSUB25:DX=0:DY=-DY:GOTO105
116 IFPEEK(197)=31THEN100
117 IFPEEK(197)=23THEN102
151
6 Dexterity
118 GOTO104
125 DATA 218,218,218,218,160,148,136,149
,142,132,133,146,130,137,146,132,160
218 218 218
126 DATA218,218,218,218,218,218,218,134,
137,146,147,148,160,147,129,148,133,
140,140,137
127 DATA148,133,218,218,218,218,147,131,
143,146,133,160,160,160,160,160,160,
136,137,160
128 DATA160,160,160,160,160,160
152
Dexterity
6
Doug Ferguson
153
Dexterity
strategy is to make sure you hear the ball being caught before
you move the hand toward another catch. The game can be
slowed down merely by adding a few extra GOSUB 150 state
ments in the main loop, preferably at lines 860, 900, and 940.
The game will run on either the unexpanded or expanded
VIC-20. I would rather not explain how it all works, mainly
because it often follows inconsistent logic and layout. One
technical footnote for those curious enough to investigate the
program: instead of using zeros as values, I used a period (as
in Y = .) because I read somewhere that this is faster and still
zeros out the variable.
To start a game, push the joystick up or left for the three-
ball or two-ball games, respectively. To repeat the same game,
press the fire button, or move the stick to change games. If
you want to quit, hit Q.
154
Dexterity
310 IFPEEK(H+12)<64THEN350
320 RETURN
330 POKEJ%(K-A),32:D=K-1:GOSUB630:GOTO54
0
340 POKEU%(L-B),32:D=L:GOTO540
350 POKEG%(M-C),32:D=M+1:GOSUB640:GOTO54
0
360 POKEH+2,32:POKEH+3, 32:POKEH-1,74:POK
EH,64:POKEH+1,75
370 POKEH+4,32:POKEH+5,32:POKEH+24,32:PO
KEH+23, 77:POKEH+25,32
3 80POKEH+14,3 2:POKEH+15,32:POKEH+11,74:
POKEH+12,64:POKEH+13,75
390 POKEH+16,32:POKEH+17,32:POKEH+37,32:
POKEH+35,77:POKEH+36,32
400 POKEH+187,77:POKEH+188,78:POKEH+209,
32:POKEH+181,103:POKEH+203,122:POKEH
+180,32:U=.
410 RETURN
420 POKEH+1,74:POKEH+2,64:POKEH+3,75:POK
EH,32:POKEH-1,32
430 POKEH+4,32:POKEH+5,32:POKEH+25,32:PO
KEH+23,32:POKEH+24,72
440 POKEH+13,74:POKEH+14,64:POKEH+15,75:
POKEH+12,32:POKEH+11,3 2
450 POKEH+16,32:POKEH+17,32:POKEH+37,32:
POKEH+35,32:POKEH+36,72
460 POKEH+181,103:POKEH+203,122:POKEH+18
7,101:POKEH+209,76:POKEH+188,32:POKE
H+180,32:U=1
470 RETURN
480 POKEH+3,74:POKEH+4,64:POKEH+5,75:POK
EH+2,32:POKEH+1,32
490 POKEH,32:POKEH-1,32:POKEH+25,78:POKE
H+23,32:POKEH+24,32
500 POKEH+15,74:POKEH+16,64:POKEH+17,75:
POKEH+14,32:POKEH+13,32
510 POKEH+12,32:POKEH+11,32:POKEH+37,78:
POKEH+35,32:POKEH+36,32
520 POKEH+181,78:POKEH+180,77:POKEH+203,
32:POKEH+187,101:POKEH+209,76:POKEH+
188,32:U=2
155
6 Dexterity
530 RETURN
540 GOSUB650:PRINTTAB(D)"{21 DOWN}{WHT}C
RASH{HOME}";:POKEV-1,N:POKE7954-SC,1
5:POKEH-36,34
550 FORT=15TO0STEP-1:POKEV,T:POKEV+1,PEE
K(V+1)AND248ORT
560 FORW=1TO100:NEXT:NEXT:POKEV-1,.:POKE
36879,75
570 PRINTTAB(7)"{YEL}{2 DOWN}GAME OVER
{DOWN}":POKEH-14,64:GOTO590
580 PRINT"{4 SPACES}{BLK}t{YEL} 3 BA
LLS { DOWN } " : PRINT " { 4 SPACES } { BLK } ■<
{YEL} 2 BALLS{DOWN}":PRINT"
{4 SPACES}PRESS {RVS}Q{OFP} TO QUIT"
:GOSUB140
590 GETA$:IFA$="Q"THENSYS65234
595 IFFNJ(32)ANDY<>2THENRESTORE:E=0:O=0:
GOTO710
600 IFFNJ(16)THENCLR:Y=1:GOTO700
610 IFFNJ(4)THENCLR:GOTO700
620 GOTO590
630 FORT=38884TOT+6:POKET-CO,7:NEXT:FORT
=38900TOT+6:POKET-CO,7:NEXT:RETURN
640 FORT=38884TOT+6:POKET-CO,6:NEXT:FORT
=38899TOT+6:POKET-CO,6:NEXT:RETURN
650 FORT=8165+DTOT+2:POKET-SC,123:NEXT
660 RETURN
670 PRINT"{CLR}{DOWN}{6 SPACES}{YEL}VIC
JUGGLER{WHT}"
680 PRINT"{3 DOWN}{3 RIGHTjUSE JOYSTICK
ONLY{4 DOWN}"
690 PRINT"{YEL}{4 RIGHTjCHOOSE GAME
{DOWN}":GOTO580
700 V=36878:H=7968:G=37152:DIMJ%(18),U%(
16),G%(13)
710 PRINT"{CLR}";:IFPEEK(36869)=192THENS
C=3584:CO=512
720 H=7968-SC:GOSUB140
730 FORX=8015TO8025:POKEX-SC,64:NEXT:POK
EX-6-SC104
740 POKEH-37,93:POKEH-35,93:POKEH+7,74:P
OKEH+9,75:POKEH+30,93:POKEH+118,102
750 POKEH-15,93:POKEH-13,93:POKEH-59,85:
156
Dexterity
6
POKEH-57,73
760 POKEH-36,114:POKEH-14,82:POKEH+8,114
:POKEH-58,64:POKEH+74,102
770 POKEH+139,78:POKEH+141,77:POKEH+160,
78:POKEH+164, 77:POKEH+96,102
780 GOSUB360
790 FORK=2TO16:READJ%(K):J%(K)=J%(K)-SC:
POKEJ%(K)+30720+SC-CO,7:NEXT
800 FORK=2TO14:READU%(K):U%(K)=U%(K)-SC:
NEXT
810 FORK=2TO12:READG%(K):G%(K)=G%(K)-SC:
POKEG%(K)+30720+SC-CO,6:NEXT
820 K=INT(RND(1)*8)+2:A=1
830 L=INT(RND(1)*7)+2:B=1
840 IFY=0THENM=INT(RND(1)*6)+2:C=l
850 IFO>49+450*ABS(C)THENE=1:Y=.
860 GOSUB150
870 N=220:IFK=17THENGOSUB270:A=-l:G0SUB1
10:K=15-E
880 IFK=1THENGOSUB210:A=l:GOSUB110:K=3+E
890 POKEJ%(K-A), 32:POKEJ%(K),81:K=K+A
900 GOSUB150
910 IFL=15THENGOSUB290:B=-1:GOSUB110:L=1
3-E
920 IFL=1THENGOSUB230:B=1:GOSUB110:L=3+E
930 POKEU%(L-B),32:POKEU%(L),81:L=L+B
940 GOSUB150
950 IFM=13THENGOSUB310:C=-1:GOSUB110:M=1
1-E
960 IFM=1THENGOSUB250:C=l:GOSUB110:M=3+E
970 POKEG%(M-C),32:POKEG%(M),81:M=M+C:IF
E=.THEN850
980 POKEJ%(K-3*A),32:POKEJ%(K-2*A),81
990 POKEU%(L-3*B)/32:POKEU%(L-2*B),81
1010 POKEG%(M-3*C)/32:POKEG%(M-2*C),81:G
OTO860
1020 DATA 7946,7902,7858,7815,7772,7730,
7710,7712,7714,7738,7784,7829,7874,
7918,7962
1030 DATA7948,7904,7860,7817,7774,7754,7
756,7758,7782,7827,7872,7916,7960
1040 DATA7950,7906,7862,7819,7798,7778,7
802,7825,7870,7914,7958
157
Dexterity
Frank J. Tyniw
Suggested Modification
One way to improve your programming skills is to first try to
understand how a program works, and then try to modify or
improve it. Why not try to make some changes in Deflector?
For example, you could use programmable characters for the
158
Dexterity
6
159
6 Dexterity
160 FORI=1TOJ
170 A=INT(506*RND(1))
180 IFPEEK(SS+A)=TRTHEN170
185 POKES2,0:POKES3,0
190 POKESS+A,TR:POKESR+A,6:GOSUB4300
200 NEXTI
205 POKES2,0:POKES3,0
210 A=INT(506*RND(1))
230 U=A+SS
240 DI=1:IFRND(1)>.5THENDI=-1
300 GETX$
310 IFX$o""THEN600
320 NE=U+DI
330 IFABS(DI)=1THEN430
340 IFDI>0THEN380
350 IFNE<SSTHENDI=-DI:GOSUB6000:GOTO320
355 A=NE
360 IFPEEK(A)=77THENDI=-1:NE=NE-1
370 IFPEEK(A)=78THENDI=1:NE=NE+1
375 GOTO530
380 IFNE>SS+506THENDI=-DI:GOSUB6000:GOTO
320
390 A=NE
400 IFPEEK(A)=77THENDI=1:NE=NE+1
410 IFPEEK(A)=78THENDI=-1:NE=NE-1
420 GOTO530
430 IFDI>0THEN490
440 IFNE-22*INT(NE/22)=1THENDI=-DI:GOSUB
6200:GOTO320
450 A=NE
460 IFPEEK(A)=77THENDI=-22:NE=NE+DI
470 IFPEEK(A)=78THENDI=22:NE=NE+DI
480 GOTO530
490 IFNE-22*INT(NE/22)=2THENDI=-DI:GOSUB
6200:GOTO320
500 A=NE
510 IFPEEK(A)=77THENDI=22:NE=NE+DI
520 IFPEEK(A)=78THENDI=-22:NE=NE+DI
530 POKEU,32
540 IFPEEK(NE)=32THENPOKENE,81:U=NE:GOTO
300
550 IFPEEK(NE)=TRTHENK=K+1:SC=SC+10
160
Dexterity
6
552 IFPEEK(NE)=TRTHENGOSUB5000
555 POKENE,170:U=NE:FORI=1TO25:NEXT
560 IFK=JTHEN700
570 GOTO300
600 IFX$="VTHENA=78:GOTO630
610 IFX$="{Fl}"THENA=77:GOTO630
615 IFX$="fc"THENGOSUB2000
616 IFX$="Q"THEN990
620 GOTO320
625 GOSUB4600
630 IFPEEK(U+DI)=3 2THENP0KEU+DI,A:SL=SL+
1:SC=SC-1
640 GOTO300
700 REM
712 PRINT"{CLR}":POKEBC,125
715 IFSOHSTHENHS=SC: PRINT "{RVS} NEW ";
716 PRINT"HIGH SCORE:"HS"{LEFT} "
720 PRINT"{DOWN}IT TOOK"SL"SLASHES
730 PRINT"{DOWN}TO HIT"J"TARGETS"
905 PRINT"{DOWN}YOUR SCORE";SC
910 PRINT"{2 DOWNjTRY AGAIN?(Y OR N)"
920 GETW$:IFW$=""THEN9 2 0
925 IFW$="N"THEN990
926 SL=0:SC=0
930 PRINT:PRINT"HOW MANY TARGETS";:INPUT
J
940 J=ABS(INT(J))
960 PRINT"{CLR}":POKEBC,93:GOSUB7000:K=0
:T=0:GOTO155
990 PRINT"{CLR}":POKEBC,27:END
1000 PRINT"{CLR}"
1010 PRINTCHR$(14);"{2 SPACES}THE OBJECT
OF THIS
1015 PRINT"{DOWN}GAME IS TO DEFLECT THE
1020 PRINT"{DOWN}{UP}BALL INTO THE BOXES
BY
1025 PRINT"{DOWN}{UP}USING « AND Fl KEY
S
1030 PRINT"{DOWN}TO PRINT DIAGONALS IN
1035 PRINT"{DOWN}ITS PATH. IF YOU GET
1040 PRINT"{DOWN}STUCK IN A LOOP USE
1045 PRINT"{DOWN}THE fe KEY AS A PANIC
161
i Dexterity
1050 PRINT"{DOWN}BUTTON.
1085 PRINT"{3 DOWN}HIT ANY KEY...
1090 GETB$:IFB$=""THEN1090
1100 PRINT" {CLR} {DOWN}S_CORING IS 10 POIN
TS
1110 PRINT"{DOWN}PER BLOCK HIT, ONE
1120 PRINT"{DOWN}POINT SUBTRACTED FOR
1130 PRINT"{DOWN}EVERY SLASH YOU LAY,
1140 PRINT"{DOWN}AND -5 FOR EVERY SLASH
1150 PRINT"ON THE SCREEN IF YOU
1160 PRINT"{DOWN}HIT THE PANIC BUTTON.
1170 PRINT"{4 DOWNjHIT ANY KEY TO START.
1180 GETA$:IFA$=""THEN1180
1190 RETURN
2000 FORI=SSTOSS+506
2010 IFPEEK(I)<>77ANDPEEK(I)O78THEN2030
2020 GOSUB4300:POKES2,0:POKES3,0:SC=SC-5
:POKEI,32
2030 NEXT I
2040 RETURN
4300 SO=INT(RND(1)*100)+129
4310 POKEVO,V:POKES3,SO:POKES2,SO:FORT1=
1TO3 5:NEXTT1:RETURN
5000 POKEVO,V:FORS=128TO250STEP10
5010 POKES4,S
5020 NEXTS
5030 POKEVO,0:POKES4,0:RETURN
6000 POKEVO,V:POKES3,250:FORII=1TO25:NEX
Til:POKES3,0:POKEVO,0:RETURN
6200 POKEVO,V:POKES3,245:FORII=1TO25:NEX
Til:POKES3,0:POKEVO,0
6210 RETURN
7000 FORI=38400TO38905:POKEI,6:NEXT:RETU
RN
63000 REM SCREEN ADJUSTMENT
63010 POKE36879,24:PRINT"{CLR}":H=PEEK(3
6864):V=PEEK(36865)
63020 PRINT"ADJUST SCREEN? (Y/N)"
63030 GETA$:IFA$=""THEN63030
63040 IFA$="Y"GOTO63060
63050 PRINT"{CLR}{BLK}";:RETURN
162
Dexterity
6
163
6 Dexterity
Paul Burger
164
Dexterity
6
points are scored for using a saving jump to get over a hole.
This method can also be used to jump two holes in a row.
Simply make a saving jump as described above for the first
hole, and Jack will fly over the second hole (this scores points
only for the second hole, however).
2 FORI=7702TO7723:POKEI,53:NEXT:FORI=781
2TO7833:POKEI,53:NEXT:FORI=7900TO7921:
POKEI,53:NEXT
3 POKE36879/C:FORI=8032TO8053:POKEI,53:N
EXT:F0RI=8142T08163:POKEI,53:NEXT
4 FORI=38400TO38884+21:POKEI,4:NEXT
5 FORI=38488TO38510+21:POKEI,F%:NEXT
6 FORI=38576TO38598+21:POKEI,F%:NEXT
7 FORI=38708TO38730+21:POKEI,F%:NEXT
8 FORI=38818TO38840+21:POKEI,F%:NEXT:GOS
UB10020:FORI=1TO1000:NEXT
9 1=7790
10 IFI/2=INT(I/2)THENPOKEI-1,59:GOSUB110
11 IFI/2=INT(1/2)THENPOKEI,55:FORJ=1TOT:
NEXT:GOTO14
13 POKEI-1,59:POKEI,56:FORJ=1TOT:NEXT:B=
7812:GOSUB510
14 IFPEEK(197)=32THENGOSUB20
15 IFPEEK(1+22)=54THENPOKEI,59:GOTO30
16 IFPEEK(1+22)=60THEN500
17 1=1+1iIFI>7811THENI=7790:POKE7811,59
18 GOTO10
20 1=1-21:P0KEI+21,59
21 IFPEEK(1+22)<>59ORPEEK(1+44)<>53THENS
C=SC+X:POKEI-22,P:GOSUB112:POKEI-22, 5
9
23 POKEI,55:FORJ=1TOT:NEXT:1=1+23:IFI>78
11THENI=7790:POKE7811,59
24 POKE7789,59:POKE7790,59
25 FORJ=1TOT:NEXT:POKEI-23,59:POKEI,55:R
ETURN
165
6 Dexterity
30 1=7898
31 IFl/2=INT(1/2)THENPOKEI+1,59:GOSUB110
32 IFl/2=INT(1/2)THENPOKEI,58:FORJ=1TOT:
NEXT:GOTO34
33 POKEI+1,59:POKEI, 57:FORJ=1TOT:NEXT:B=
7900:GOSUB510
34 IFPEEK(197)=32THENGOSUB40
35 IFPEEK(1+22)=54THENPOKEI,59:GOTO50
36 IFPEEK(1+22)=60THEN500
37 1=1-1: IFK7878THENI=7898: POKE7878, 59
38 GOTO31
40 1=1-23:POKEI+23,59
41 IFPEEK(1+22)< > 59ORPEEK(1+44)< > 53THENS
C=SC+X:POKEI-22,P:GOSUB112:POKEI-22,5
9
43 POKEI, 581 FORJ=1TOT:NEXT: 1=1+21: IFK78
78THENI=7898:POKE7878,59
44 POKE7856/59:POKE7855,59
45 FORJ=1TOT:NEXT:POKEI-21,59:POKEI,58:R
ETURN
50 I=80i0
51 IFl/2=INT(l/2)THENPOKEI-l,59:GOSUBll0
52 IFI/2=INT(1/2)THENPOKEI,55:FORJ=1TOT:
NEXT:GOTO54
53 POKEI-1,59:POKEI,56:FORJ=1TOT:NEXT:B=
8032:GOSUB510
54 IFPEEK(197)=32THENGOSUB60
55 IFPEEK(1+22)=54THENPOKEI,59:GOTO70
56 IFPEEK(1+22)=60THEN500
57 1=1+1:IFI>8031THENI=8010:POKE8031,59
58 GOTO51
60 1=1-21:POKEI+21,59:IFPEEK(I)< > 59THENS
C=SC+300
61 IFPEEK(1+22)<>59ORPEEK(1+44)<>53THENS
C=SC+X:POKEI-22,P:GOSUB112:POKEI-22,5
9
63 POKEI,55:FORJ=1TOT:NEXT:1=1+23:IFI>80
31THENI=8010:POKE8031,59
64 POKE8009/59:POKE8010,59
65 FORJ=1TOT:NEXT:POKEI-23,59:POKEI, 55: R
ETURN
70 1=8140
166
Dexterity
6
71 IFI/2=INT(I/2)THENPOKEI+1,59:GOSUB110
72 IFl/2=INT(l/2)THENPOKEI,58:FORJ=lTOT:
NEXT:GOTO74
73 POKEI+1,59:POKEI,57:FORJ=1TOT:NEXT:B=
8142:GOSUB510
74 IFPEEK(197)=32THENGOSUB80
75 IFPEEK(1+22)=54THENPOKEI,59:GOTO100
76 IFPEEK(1+22)=60THEN500
77 1=1-1:IFI<8120THENI=8140:POKE8120,59
78 GOTO71
80 1=1-23:POKEI+23,59
81 IFPEEK(1+22)< > 59ORPEEK(1+44)< > 53THENS
C=SC+X:POKEI-22,P:GOSUB112:POKEI-22,5
9
83 POKEI,58:FORJ=1TOT:NEXT:1=1+21:IFI<81
20THENI=8140:POKE8120/59
84 POKE8098,59:POKE8097,59
85 FORJ=1TOT:NEXT:POKEI-21,59:POKEI,58:R
ETURN
100 P=P+1:IFP=64THENP=61
101 D=D-l:T=T-50
102 X=X+50:IFX>125THENX=25:D=8:T=150:C=2
7:F%=5
103 IFX=75THENC=232:F%=0
104 IFX=125THENC=8:F%=7
105 GOTO2
110 POKES,140:FORY=1TO10:NEXT:POKES,0:RE
TURN
111 POKES+1,190:FORY=1TO25:NEXT:POKES+1,
0:RETURN
112 FORO=1TO15:POKES,200+0:NEXTO:POKES,0
:RETURN
113 FORO=20TO0STEP-1:POKES,230+0:FORY=1T
025:NEXTY,O:POKES,0:RETURN
500 GOSUB113:M=M-1:IFM=0THEN502
501 P=61:X=25:D=6:C=27:T=150:F%=5:POKEI,
59:GOTO2
502 P0KE36869,240:PRINTCHR$(147);SPC(225
);"GAME OVERI":PRINT:PRINT"YOUR SCOR
E WAS ";SC
503 PRINT:PRINT"PLAY AGAIN?"
504 K=PEEK(197):IFK=32ORK=64THEN504
167
6 Dexterity
505 IFK=11THENRUN
506 END
510 IFINT(RND(1)*D)+1<>1THENRETURN
511 L=INT(RND(1)*21)+1:IFL=20ORL=1THEN51
1
512 POKEB+L,60:GOSUB111:RETURN
10000 DATA255,129/66,66,36/36,24,255
10002 DATA66,126,66,66,66,126,66,66
10003 DATA12,8,13,62,44,12,18,33
10004 DATA24,16,24,24,24,16,16,24
10005 DATA24,8,24,24,24,8,8,24
10006 DATA24,8,88,62,26,24,36,66
10007 DATA0,0,0,0,0,0,0,0
10008 DATA129,66,66,66,98,34,34,34
10009 DATA27,10,27,17,27,0,0,0
10010 DATA59,10,11,9,11,0,0,0
10011 DATA91,74,91,81,91,0,0,0
10012 RESTORE:FORI=7592TO7679:READA:POKE
I,A:NEXT
10015 POKE36869,255
10016 GOTO1
10020 FORI=7832TO7898STEP22:POKEI,54:NEX
T:FORI=7901TO8011STEP22:POKEI,54:N
EXT
10021 FORI=8052TO8140STEP22:POKEI,54:NEX
T:FORI=38552TO38618STEP22:POKEI,6:
NEXT
10022 FORI=38621TO38731STEP22:POKEI,6:NE
XT:FORI=38772TO38860STEP22:POKEI,6
:NEXT
10023 POKE8143,54:POKE8165,54:POKE38863,
6:POKE38885,6:RETURN
168
Dexterity
6
Alan Crossley
The sky is clear, the land is flat, but the winds are variable.
You are determined to learn to skydive. Not only do you wish
to learn to skydive, but you wish to become an expert. Safe
jumps are always important, but you also want to be able to
land exactly where you have preselected.
Playing Skydiver
It is up to you to decide which landing pad to try for. There
are three pads to choose from — labeled 2X, 5X, and 10X.
Each pad is more difficult to land on than the previous one
and therefore scores more points. If you land successfully,
you are rewarded with bonus points. If you miss, you lose
one of your three skydivers.
At 5000 points you are awarded an extra skydiver. Each
time you make two successful landings, the game's difficulty
level increases, and the bonus value goes up 50 points.
Controlling the Dive
Press the joystick button to clear the title screen. Next, pick
which landing pad to try for by manipulating the joystick to
indicate your selection. Don't let the countdown timer run out
because then you will have to land wherever the computer
decides. Once you have selected the landing pad, press the
joystick button to inform the computer of your choice and to
start the dive.
Take note of the wind speed and direction; you must take
it into account when deciding when to jump. The airplane
will emerge from the left side of the screen. If you do not
dive by the time the airplane reaches the right side of the
screen, it will reappear on the left.
To dive, simply press the joystick button and watch your
169
, Dexterity
170
Dexterity
6
105 IFA>=20THENPRINT"{HOME}{DOWN}";TAB(A)
j" {DOWN}{LEFT}{2 SPACES}":A=0
110 GOSUB 1000:IFR<>128THENFORI=1TO50:NEX
T:GOTO100
112 IFA>20ORA<1THEN100
120 PRINT"{HOME}{DOWN}"?TAB(A);m {LEFT}
{DOWN}{2 SPACES}"
200 B=7747+A:T=INT(RND(TI)*8+1):T=T+1
210 CH=46:C=0
212 C=C+1
220 POKEB,CH:POKEB,32:B=B+22
230 POKEB+T7,4:POKEB,CH:IFC<TTHENFORY=1TO
80:NEXT:GOTO212
300 CH=65
305 POKEB+T7,4:POKEB,CH
310 GOSUB1000:C=C+1
320 IFO=WTHENIFR=4THENPOKEB/ 32 :B=B-1 :POK
EB+T 7,4:POKEB,CH:C=0
330 IFO=WTHENIFR=8THENPOKEB, 32 :B=B+1 :POK
EB+T7,4:POKEB,CH:C=0
340 D=D+1
350 IFD>=WATHENPOKEB,32:B=B+22
355 IFD>=WATHEND=0:IFPEEK(B)<>32THEN3000
360 POKEB+T7,4:POKEB,CH
370 WI=WI+1
390 IFWI>=SANDDI=-1THENPOKEB,32:B=B+DI:PO
KEB+T7,4:WI=0
395 IFWI>=SANDDI=1THENPOKEB,32:B=B+DI:POK
EB+T7,4:WI=0
400 IFPEEK(B)O32ANDPEEK(B)<>CHTHEN3000
410 POKEB,CH
500 GOTO300
1000 POKEP3,127:X=NOTPEEK(P1)AND60-((PEEK
(P2)AND128)=0):POKEP3,255
1010 R=-((XAND4)=4)-2*((XAND8)=8)-4*((XAN
D16)=16)-8*((XAND1)=1)-128*((XAND32
)=32)
1020 RETURN
3000 POKEB+T7,4
3010 IFP=1THENIFB=8124ORB=8125THENPOKEB,C
H:GOTO4000 ni.n
3020 IFP=2THENIFB=8130THENPOKEB,CH:GOTO4050
171
6 Dexterity
3030 IFP=3THENIFB=8135ORB=8136ORB=8137THE
NPOKEB,CH:GOTO4100
3040 POKEB,170:GOTO12000
4000 PRINT"{HOME}{8 DOWN}{5 RIGHT}5 X";BO
;"=";5*BO
4010 VA=5*BO:GOTO10000
4050 PRINT"{HOME}{8 DOWN}{4 RIGHT}10 X";B
O;"=";10*BO
4060 VA=10*BO:GOTO10000
4100 PRINT"{HOME}{8 DOWN}{5 RIGHT}2 X";BO
;"=";2*BO
4110 VA=2*BO:GOTO10000
5000 PRINT"{HOME}{19 DOWN}"
5020 PRINT"{3 SPACES}{BLK}gL§{YEL}
12 l3{BLK}gJ3{2 SPACES}{BLK}
Bl!{yel}&i3{blk}Bj3{2 spaces}
iL8{YEL}B3 l3{BLK}gJ3{BLU}"
5030 PRINT"{RVS}{4 SPACES}5X{3 SPACES}10X
{4 SPACES}2X{4 SPACES}{OFF}";
5040 FORI=8164TO8185:POKEI+T7,6:POKEI,160
:NEXT
5041 IFBA<=0THEN60000
5042 PRINT"{HOME}";TAB(17);"{4 SPACES}"
5043 IFBA>1THENPRINT"{HOME}";TAB(18);:FOR
I=1TOBA-1:PRINT"A";:NEXT:PRINT
5045 SS=INT(RND(TI)*3+1):DI=INT(RND(TI)*2
+1):IFDI=2THENDI=-1
5048 IFSS=1THENS=5:SD=15
5049 IFSS=2THENS=10:SD=10
5050 IFSS=3THENS=15:SD=5
5052 D$="RIGHT":IFDI=-1THEND$="LEFT"
5053 IFNJ>=NETHENBO=BO+50:PRINT"{HOME}
{7 DOWN}BONUS ADVANCE TO{RED}";BO:P
RINT"{BLU}"
5054 IFNJ>=NETHENIFWA>4THENWA=WA-1
5055 IFNJ>=NETHENNJ=0:IFW<18THENW=W+l
5056 PRINT"{HOME}{2 DOWN}";TAB(3);"WIND:"
;SD"TO ";D$:GOSUB50000
5057 FORK=1TO1000:NEXT:PRINT"{HOME}{DOWN}
{20 SPACES}"
5060 FORI=7724TO8141STEP22:POKEI,96:POKEI
+21,96:NEXT
172
Dexterity
6
5070 RETURN
10000 JM=JM+1:NJ=NJ+1
10100 FORP=1TOVA/10:PRINT"{HOME}{BLUjSCOR
E:{RED}";SC:POKES3,0:SC=SC+10:NEXT
:PRINT"{HOME}{BLU}SCORE:{RED}";SC
10110 FORID=1TO1000:NEXT:IFEX=0ANDSC>=500
0THENBA=BA+1:EX=1
10120 PRINT"{HOME}{8 DOWN}{21 SPACES}":GO
TO20
12000 PRINT"{HOME}{8 DOWN}{3 RIGHT}SORRY
NO BONUS1":BA=BA-1
12010 FORID=1TO500:NEXT
12120 POKEB,32:PRINT"{HOME}{8 DOWN}
{21 SPACES}":GOTO20
50000 REM SELECTION
50010 PRINT"{HOME}{4 DOWN}{RED}{4 SPACES}
5X{3 SPACES}10X{2 SPACES}2X{BLU}":
P=l:Z=P
50020 TI$="000000"
50025 POKEA(P),PEEK(A(P))+128AND255
50027 TM=15-VAL(TI$)
50028 PRINT"{HOME}{12 DOWN}";TAB(10);"
{2 SPACES}{3 LEFT}";TM:IFTM=0THENP
=INT(RND(TI)*3+l):GOTO50100
50030 GOSUB1000:IFR=4ORR=8THENX=PEEK(A(P)
):IFX>129THENPOKEA(P),X+128AND255
50035 IFR>127THEN50100
50040 GOSUB1000:IFR=4THENP=P-1:IFP<1THENP
=3
50045 IFR=8THENP=P+1:IFP>3THENP=1
50050 FORID=1TO100:NEXT:GOTO50025
50100 A$="2X":IFP=1THENA$="5X"
50110 IFP=2THENA$="10X"
50120 PRINT"{DOWN} YOU MUST LAND ON ";A$
50140 FORID=1TO1500:NEXT
50150 PRINT"{HOME}":FORID=1TO18:PRINT"
{21 SPACES}":NEXT:RETURN
60000 PRINT"{HOME}{7 DOWN}{6 RIGHT}GAME O
VER": IFSOHITHENHI=SC
60010 FORHD=1TO2000:NEXT
60020 PRINT"{HOME}{7 DOWN}{6 RIGHT}
{9 SPACES}"
173
, Dexterity
174
Dexterity
6
Fly down through the dangerous skies of the planet Dindrin to col
lect golden stones. Retrieve enough of them and you can win the
game, but beware of the floaters, skimmers, and lizards.
175
6 Dexterity
The Programs
The Hawkmen of Dindrin is divided into two programs. The
first program makes custom characters and automatically
loads the main game program. Be sure to SAVE Program 6-7
immediately following Program 6-6 on the same tape.
10 PRINT" {CLR}":POKE36879, 93
20 PRINT"{3 SPACES}{RVS}HAWKMEN OF DINDRIN
{OFF}"
176
Dexterity
6
50000 X=PEEK(56)-2:POKE52,X:POKE56,X:POK
E51,PEEK(55):CLR
50010 CS=256*PEEK(52)+PEEK(51)
50020 FORI=CSTOCS+511:POKEI/PEEK(1+32768
-CS):NEXT
50030 READX:IFX<0THEN50090
50040 FORI=XTOX+7:READJ:POKEI,J:NEXT
50050 GOTO50030
50090 DATA7512,0,28,54,255,48,30,0,0
50091 DATA7504,35,85,91,192,109,41,101,2
6
50092 DATA7496,255,126,60,60,60,60,255,2
55
50093 DATA7168,134,205,207,252,255,96,96
,24
50094 DATA7432,0,0,0,255,0,0,0,0
50095 DATA7440,0,90,60,90,126,24,36,66
50096 DATA7448,0,24,36,66,66,66,36,255
50097 DATA7456,24,135,133,199,71,103,103
,255
50098 DATA7464,24,207,141,239,255,255,25
5,255
50099 DATA7472,0,0,0,170,85,0,0,0
50100 DATA7488,255,255,255,255,255,255,2
55,255
50101 DATA-1
63000 POKE198,5:POKE631,78:POKE632,69:PO
KE633,87:POKE634,13:POKE635,131:END
177
. Dexterity
22 FORA=0TO21:P0KE8164+A,40;P0KE38884+A,
6:NEXTA
30 FORA=0TO21:POKE8142+A,35:POKE38862+A,
5:NEXTA
35 PRINT"{HOME}{18 DOWN} 111+"
40 POKE36878,15
50 POKEYC,0:POKEY,0
51 J=PEEK(37151):E=E-1:GOSUB600
52 IFJ=94THENGOSUB100
53 IFJ=110THENQ=-1
54 IFJ=126THENQ=1
55 IFJ=118THENQ=23:POKES2,130
56 IFJ=122THENQ=-21:POKES2,210
57 POKEY,32:POKES2,0:IFY+Q<7790ORY+Q>=81
63THEN500
58 PRINT"{HOME}LIFE:";TN:PRINT"{HOME}
{DOWN}{6 RIGHT}";SC:PRINT"{7 RIGHT}
{7 SPACES}{6 LEFT}";E:IFE<=0THEN1000
59 IFPEEK(Y+Q)=35THEN90
60 IFPEEK(Y+Q)=32THEN75
71 IFPEEK(Y+Q)<>32THEN500
75 Y=Y+Q: YOYC+Q: POKEYC, 0: POKEY, 0
76 IFPEEK(Y+22)=36THEN300
80 GOTO51
90 Y=Y+Q:YOYC+Q: POKEYC, 0: POKEY, 0: SC=SC+
100:E=E+100
92 FORI=1TO20:POKES1,220+1:NEXTI:POKES1,
0
93 POKEY,32:Y=Y-22:YC=YC-22:POKEYC,0:POK
EY,0
96 GOTO51
100 IFY>=8138THENRETURN
101 E=E-3:IFE<=0THEN500
102 G=250
105 FORX=1TO3
110 IFPEEK(Y+X)<>32THEN135
115 POKEY+X,33:POKES 3,G:G=G+1:NEXTX
119 B=3
120 FORX=BTO1STEP-1
125 POKEY+X,32:POKES3,G:G=G-1
129 POKES3,0
130 NEXTX:RETURN
178
Dexterity
6
135 IFPEEK(Y+X)=34THENE=E+20:SC=SC+15
140 IFPEEK(Y+X)=33ORPEEK(Y+X)=43THENE=E+
10:SC=SC+5
145 P0KES1, 195:POKEY+X,42:B=X:FORJ=0TO60
:NEXTJ
149 POKES1,0
150 GOTO120
300 POKEY,0
305 POKEYC+22,2:POKEYC,2:POKEY+22,41:POK
EY,36
310 FORB=1TO100
315 POKEY,36
320 POKES4,187
325 POKEY,37
330 POKES4,127
335 NEXTB:POKES4,0
345 POKEY,32:POKEY+22,35
346 E=INT(E*.5)
350 TN=TN-1:IFTN=0THEN1000
351 Y=7813:YC=38533:GOTO50
500 IFPEEK(Y+Q)=36THENPOKEY+23,35:POKEY+
22,36:GOTO300
501 Y=Y+Q:YC=YC+Q:POKEYC,2:POKEY,42
502 FORH=240TO220STEP-1
503 POKES3,HrNEXTH:POKES3,0
505 POKEY,32
506 TN=TN-1:IFTN=0THEN550
507 YC=38533:Y=7813:GOTO50
550 GOTO1000
600 O=INT(RND(1)*22)+1:IFO=22THENO=0
602 D=INT(RND(1)*2)+1
603 IFD=1THENPOKE38862+O,4:POKE8142+O,36
604 IFD=2THENPOKE38862+O,5:POKE8142+O,35
605 POKE(SK-3),32:POKESK,33
606 IFPEEK(SK+1)=0THENY=Y+1:GOTO500
608 MKC=MKC+1:SK=SK+1
609 IFSK=8098THENSK=8076:MKC=38796:POKE8
096,32:POKE8097,32:POKE8095,32
610 POKEMKC,8:POKESK,43
611 Z=INT(RND(1)*10)+1:IFZ<>5THEN650
179
6 Dexterity
612 F=INT(RND(1)*242)+1:IFPEEK(FL+F)<>32
THEN612
614 W=INT(RND(1)*7)+1
615 IFW=7THEN614
616 POKEFC+F,W:POKEFL+F,34
625 IFE<100THENPOKE36879,127
626 IFE>100THENPOKE36879,122
650 RETURN
1000 PRINT"{CLR}"
1005 PRINT"IF YOU WISH TO PLAY":PRINT"AG
AIN, PRESS THE FIRE BUTTON."
1010 PRINT"{PUR}IF NOT,THEN PRESS THE"sP
RINT"JOYSTICK DOWN."
1015 PRINT"YOUR SCORE:";SC
1020 PRINT"YOUR TIME :";VAL(TI$)
1023 IFSO=10000THENPRINT"{RVS} {RED}YOU
HAVE WON1{OFF}"
1025 J=0
1030 J=PEEK(37151)
1035 IFJ=94THENRUN
1040 IFJ=118THENPOKE36869,240:PRINT"{RVS}
{BLU}{2 SPACES}HAWKMEN OF DINDRIN
{2 SPACES}{OFF}{2 SPACES}GAME TERMIN
ATED.":END
1050 GOTO1025
180
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Appendix
A
Charles Bond
183
A Appendix
The Program
The direction table set up in lines 100 and 110 converts an in
teger to an address offset. In this case (22 column screen), we
wish to be able to step two cells to the right, up, left, or
down.
Line 120 contains the variable SC, which is the memory
address of the start of screen RAM. Lines 130-160 establish the
background field on the screen.
The rest of the program draws the maze, as previously ex
plained. Line 310 is simply a convenient stopping point which
prevents the screen from scrolling.
184
Appendix
A
185
'A\ Appendix
240 J=(J+1)*-(J<3):IFJ<>XTHEN230
250 J=PEEK(A):P0KEA,HL:IFJ<4THENA=A-A(J)
:GOTO220
310 GETC$:IFC$=""THEN310
1000 POKEA,81:J=2
1010 B=A+A(J)/2:IFPEEK(B)=HLTHENPOKEB,81
:POKEA,HL:A=B:J=(J+2)+4*(J>l)
1020 J=(J-1)-4*(J=0):GOTO1010
LEAVE MARKER
ERASE BARRIER
BUMP POINTER
BACK UP
186
■ ■ ■ ■■':■ ■ ,;v.-V ■ '' ■'■ :; ■■■''^■■■■■■^|--;.;.: '■■:-■■' '■ ■ -■■-■■+.;' ¥■ ■':'S:'^^^91
Writing Your
ISiiiiffllB^
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Appendix
B
Dan Carmichael
We hope that the games in this book have provided you with
many hours of fun along with some new and advanced pro
gramming techniques.
While it is always enjoyable to play games that other pro
grammers have written, you might want to explore the world
of game programming yourself. When you create the games
and write the programs yourself, not only is there the fun of
play, but also you receive the personal gratification of a job
well done. Following are some hints, tips, and references to
help you create your own game programs.
189
B Appendix
High-Resolution Graphics
High-resolution graphics is the ability to control (turn on or
off) each individual pixel (a very tiny dot) on the TV screen.
It is used to produce those beautiful, smoothly animated pic
tures you see on the arcade-style video games.
Standard graphics uses blocks of characters that are com
posed of eight rows and columns of pixels. When you ani
mate with standard graphics, you are actually moving each
character one block, or eight rows or columns at one time.
The problem with this method is that it produces jumpy ani
mation. With the ability of high-resolution graphics to turn
each pixel on or off, you can produce smooth animation by
moving one row or column at a time.
There are limitations to high-resolution graphics. One is
the amount of memory needed to control the graphics dis
play. To produce high-resolution graphics you have to initiate
a process known as "bitmapping" the screen. This means
190
Appendix
B
Multicolor Graphics
When programming using standard or high-resolution
graphics, you have the choice of setting each character to one
of two color possibilities. You can give each character or pixel
the background screen color (which will seem to produce a
blank space on the screen), or you can assign it one of the
eight standard VIC colors. With the multicolor graphics op
tion, you can assign each character or pixel any one of four
possibilities: screen color, character color, border color, or aux
iliary color. There are eight auxiliary colors, so with multicolor
graphics you have the choice of 16 color possibilities.
There is a sacrifice, however, when using a multicolor
graphics mode: horizontal resolution. In multicolor mode,
each dot is twice as wide as in high-resolution graphics; that
is, each dot is two pixels wide. Your drawings will have to be
made with thicker columns; but often this problem is far out
weighed by the greater number of colors.
Sound Effects
Good sound effects can turn a good game into a great game.
And sound isn't just an extra. You can use sound to tell the
player that certain events have occurred without forcing him
or her to look away from the main action on the screen. You
191
B Appendix
References
Machine Language
Butterfield, Jim. "TINYMON1: A Simple Monitor for the VIC." In COM-
PUTEl's First Book of VIC. Greensboro, NC: COMPUTE! Books, 1982.
Finkel, A., N. Harris, P. Higginbottom, and M. Tomczyk. "Chapter 3:
Machine Language Programming Guide." VIC-20 Programmer's Reference
Guide. Wayne, PA: Commodore Business Machines, 1982, pp. 107-226.
Kavanagh, Russell. "Entering TINYMON1 Directly into Your VIC-20." In
COMPUTER'S First Book of VIC. Greensboro, NC: COMPUTE! Books,
1982.
Leventhal, Lance A., and Winthrop Saville. 6502 Assembly Language Subrou
tines. Berkeley, CA: Osborne/McGraw Hill, 1982.
Mansfield, Richard. Machine Language For Beginners. Greensboro, NC:
COMPUTE! Books, 1983. Contains several previously published moni
tors, maps, routines, etc.
Zaks, Rodnay. Programming the 6502. Berkeley, CA: Sybex, Inc., 1979.
192
Appendix
B
High-Resolution Graphics
Calloway, James. "Pixelator." In COftfPUTEI's Second Book of VIC.
Greensboro, NC: COMPUTE! Books, 1983.
Finkel, A., N. Harris, P. Higginbottom, and M. Tomczyk. VIC-20 Program
mer's Reference Guide. Wayne, PA: Commodore Business Machines,
1982, pp. 88-92.
Sound Effects
193
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Appendix C
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
Appendix
c
What is a Program?
A computer cannot perform any task by itself. Like a car
without gas, a computer has potential but without a program,
it isn't going anywhere. The programs published in COM
PUTERS First Book of VIC Games are written in a computer
language called BASIC. BASIC is easy to learn and is built in
to the VIC.
BASIC Programs
All but one of the programs in this book are for the Unex-
panded VIC. Most require that any additional memory car
tridges be removed or disabled. The exceptions are the en
hanced version of 'Air Defense" in Part 3 and "Word Hunt"
in Part 4, both of which require 8K or more of expansion
memory.
197
c Appendix
A Quick Review
1) Type in the program a line at a time, in order. Press
RETURN at the end of each program line. Use backspace or
the back arrow to correct mistakes.
2) Check the line you've typed against the line in the listing.
You can check the entire program again if you get an error
when you RUN the program.
3) Make sure you've entered statements in braces as the ap
propriate control key (see "Listing Conventions" elsewhere in
this book).
4) Be sure to SAVE the program on disk or tape before run
ning the program.
198
Many of the programs which are listed in this book contain
special control characters (cursor control, color keys, inverse
video, etc.). To make it easy to know exactly what to type
when entering one of these programs into your computer, we
have established the following listing conventions.
Generally, any VIC-20 program listings will contain words
within braces which spell out any special characters:
{DOWN} would mean to press the cursor down key. {5
SPACES } would mean to press the space bar five times.
To indicate that a key should be shifted (hold down the
SHIFT key while pressing the other key), the key would be
underlined in our listings. For example, S would mean to
type the S key while holding the shift key. This would ap
pear on your screen as a "heart" symbol. If you find an
underlined key enclosed in braces (e.g., {10 N}), you should
type the key as many times as indicated (in our example, you
would enter ten shifted N's).
If a key is enclosed in special brackets, ^ ^], you should
hold down the Commodore key while pressing the key inside
the special brackets. (The Commodore key is the key in the
lower-left corner of the keyboard.) Again, if the key is preced
ed by a number, you should press the key as many times as
necessary.
199
the difference between direct and programmed cursor control
is the quote mode.
Once you press the quote (the double quote, SHIFT-2),
you are in the quote mode. If you type something and then
try to change it by moving the cursor left, you'll only get a
bunch of reverse-video lines. These are the symbols for cursor
left. The only editing key that isn't programmable is the DEL
key; you can still use DEL to back up and edit the line. Once
you type another quote, you are out of quote mode.
You also go into quote mode when you INSerT spaces in
to a line. In any case, the easiest way to get out of quote
mode is to just press RETURN. You'll then be out of quote
mode and you can cursor up to the mistyped line and fix it.
Use the following table when entering cursor and color
control keys:
Press: See:
UE
200
abbreviations 146 pixel 6, 7, 190-91
address (see memory location) programmable characters 4-5
adventure games 14-15 RAM 20
arcade games 14, 19-22 random 29, 46
Artificial Intelligence 46 realtime action in games 14
BASIC realtime clock 3, 5-6
GOSUB 11 REM 146-47
IF/THEN 20 references 192-93
Keyword abbreviations 146 RND 29, 46
REM 146 saving memory (see memory)
RND 29, 46 screen adjustments 158, 162-63
bibliography 192-93 screen RAM memory 20-21
bitmapping 191 SHIFT key 94
chaining programs 120, 136-37 simulation games 14-18
clock 3, 5-6 sound 3, 5, 191-92
color 3, 4 STOP key, disabling of, 94, 95
constant 46 strategy
crunching (see memory) in adventure games 14-15
CTRL key 94 subroutine 11-12
DATA statements 197-98 VICMON 190
features 3-8 zeros, using a period 154
game writing 7-8, 10-13, 189-93
adventure 14-15
arcade 14, 19-22
maze 183-88
simulation 14-18
speed 46, 189
GOSUB 11
graphics 4-5, 6-7, 190-91
Hesmon 190
high-resolution graphics 6-7, 190-91
IF/THEN 20
initialization 10-11
Keyword abbreviations 146
loop 11
machine language 7-8, 25, 189-90
main loop 11
maze, generating of 29-30, 183-86
memory (see also RAM)
crunching 107, 146-48
saving 45-46, 107, 146-48, 189-90
memory locations
653 94, 96
808 and 809 94, 99
memory-mapped video 20-21
monitor 190
period as zero 154
201
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
If you've enjoyed the articles in this book you'll find the
same style and quality in every monthly issue of COMPUTE!
Magazine. Use this form to order your subscription to
COMPUTE!
COMPUTE!
P.O. Box 5406
Greensboro, NC 27403
My Computer Is:
□ PET QApple □ Atari QVICnOther □ Don't yet have one...
Name
Address
Country
Payment must be in US Funds drawn on a US Bank International Money
Order, or charge card.
□ Payment Enclosed □ VISA
□ MasterCard □ American Express
Acct. No. Expires /
13-2
COMPUTE! Books
P.O. Box 5406 Greensboro, NC 27403
Name
Address
Country
Allow 4-5 weeks for delivery.
13-2
COOCCPOOOOO'O OOOO..OO.0 DO ODD OOOOOQ
COMPUTE'S
Juggler Thumierbird