Crossing the Asteroid Belt

See all articles from SYNC v2 n4
Author(s): M. Hampson
Publication: SYNC
Pub Details: SYNC v2 n4 (Volume 2, Issue 4)
Date: July/August 1982
Pages: 63

You are the pilot of a space ferry going back and forth through the asteroid belt. This calls for highly skilled navigation to avoid hitting or being hit by the asteroids.

The asteroids are represented in your navigation tank by the O’s, and the position of your ferry is indicated by the asterisk. You control your movement by the arrow keys 5 and 8.

If your ferry and an asteroid collide, the asterisk becomes inverse. Then you must get another ship. You build your piloting credentials by recording how many times you have successfully crossed and recrossed the belt. In 1K the computer cannot keep the count for you.

The directions are as follows:

1) Do not use your RAM pack.

2) Enter the program in Listing 1. Be sure to type in line 1 as listed.

3) Type in RUN and ENTER.

4) Enter all the values in Listing 2. Be very careful. About halfway through the list, the ZX81 will run out of memory. Type CONT(inue) and continue entering the numbers.

5) Delete all the lines in Listing 1 except line 1 by entering the line number followed by ENTER.

6) Enter the lines in Figure 3. Note: the graphic in line 60 is an inverse asterisk (on B).

7) Type in RUN and ENTER and your journey across the asteroid belt begins.

Reprinted with permission from The Ultimate Magazine.

Listing 1.

 1 REM 11111111111111111111111
11111111122222222222222222222222
22222222233333333333333333333333
33333333344444444444444444444444
44444444455555555555555555555555
55555555566666666666666666666666
66666666677777777777777777777777
777777777
10 FOR Z=16544 TO 16736
20 INPUT X
30 PRINT (STR$ (X+1000))(2 TO );",";
40 POKE Z,X
50 NEXT Z

Listing 2.

006,016,197,014,000,205,245,008,
062,008,215,193,197,014,016,205,
245,008,062,008,215,193,016,234,
014,016,197,006,000,205,245,008,
062,008,215,193,197,006,016,205,
245,008,062,008,215,193,013,121,
254,255,032,230,033,130,064,126,
071,035,126,079,197,229,205,245,
008,062,000,215,225,193,035,126,
203,071,040,002,005,005,004,203,
079,040,002,013,013,012,043,043,
120,119,035,121,119,035,254,001,
032,002,203,142,254,015,032,002,
203,206,120,254,001,032,002,203,
134,254,015,032,002,203,198,229,
205,245,008,062,052,215,225,035,
062,160,189,194,215,064,058,033,
064,060,079,006,008,197,205,245,
008,042,014,064,126,254,052,193,
200,054,000,058,037,064,254,247,
032,004,013,032,001,012,254,239,
032,009,012,062,016,185,032,001,
013,000,000,121,061,050,033,064,
205,245,008,062,023,215,195,212,
064,

Listing 3.

 8 RAND
9 FAST
10 FOR Z=NOT PI TO VAL "27" STEP VAL "3"
20 POKE VAL "16514"+Z,INT (RND*VAL "3")+VAL "4"
21 POKE VAL "16515"+Z,INT (RND*VAL "8")+VAL "4"
22 POKE VAL "16516"+Z,INT (RND*VAL "4")
30 NEXT Z
40 POKE VAL "16417",NOT PI
45 SLOW
50 RAND USR VAL "16544"
60 PRINT "[inv *]"
70 RAND RND**RND**RND
Screen display: asteroids (O's) and the ferry in the navigation tank
Screen display: asteroids (O's) and the ferry in the navigation tank

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.