Moonlander


This is an up-market real-time lander program which gives you an opportunity to grapple with the problems which face a space-lagged cruiser commander returning home after a long haul. The object of the exercise is to land your craft on the chillingly small landing-pad at the bottom of the screen. Precision is the name of the game, because if your rate of descent is greater than -5 you and your crew are gonners. A word of warning: if you over-fire your rockets you'll disappear into hyperspace until returning back on screen, plummeting to your doom unless you've been doing some nifty blind flying to slow your descent.

   10  REM *Moon lander * BBC VERSION*  @ Rob
ert Erskine 1983
   20 REM CONVERTED FROM SPECTRUM TO BBC BY C
.R.TANNER
   30 MODE7:VDU 23;8202;0;0;0;
   40 GOSUB 410
   50 MODE1:VDU 23;8202;0;0;0;
   60 GOSUB 510
   70 IF E=0 THEN GOTO130
   80 m1=m:m=m-F1
   90 H1=H:H=(H+V)-.81
  100 V=V-((T/F1)*(LN(m/m1)))-1.62
  110 F=F-F1
  120 GOTO 160
  130 m1=m
  140 H1=H:H=(H+V)-.81
  150 V=V-1.62
  160 col1=col
  170 IF col>0 AND RND(1)>.5 THEN col=col-1
  180 IF col<39 AND RND(1)>.5 THEN col=col+1
  190 PRINT TAB(0,0);"Height ";INT(H);"      
   "
  200 PRINT "Velocity ";INT(V);"         "
  210 PRINT "Fuel ";F;"   "
  220 IF INKEY(-105) THEN E=0
  230 IF INKEY(-73) THEN E=1
  240 IF INKEY(-98) AND col>0 THEN col=col-1
  250 IF INKEY(-67) AND col<39 THEN col=col+1
  260 IF H>2700 OR H<1 THEN GOTO 290
  265 IF H>2600 THEN PRINT TAB(col1,3);" ":GO
TO 290
  270 PRINT TAB(col1,29-(H1/100));" ":COLOUR 
2:PRINT TAB(col,29-(H/100));CHR$(224)
  280 IF E=1 THEN PRINT TAB(col1,30-(H1/100))
;" ":COLOUR 1:PRINT TAB(col,30-(H/100));CHR$(
225);TAB(col,30-(H/100));" "
  290 COLOUR 1:PRINT TAB(20,28);"_"
  300 IF F=0 OR H<=0 THEN GOTO 320
  310 GOTO 70
  320 IF F=0 THEN PRINT TAB(10,8);"OUT OF FUE
L"
  330 IF H<=0 AND V<-5 THEN PRINT TAB(8,11);"
YOU HAVE CRASHED":GOTO 401
  340 IF H<=0 AND V>-6 THEN PRINT TAB(8,11);"
YOU HAVE LANDED"
  350 IF H<=0 AND V>-6 AND col=20 THEN PRINT 
TAB(8,12);"IN THE CORRECT PLACE"
  360 IF H<=0 AND V>-6 AND col<>20 THEN PRINT
 TAB(8,12);"IN THE WRONG PLACE"
  370 PRINT TAB(8,30);"PRESS ANY KEY TO RESTA
RT"
  380 *FX15,1
  390 IF INKEY$(1000)="" THEN GOTO 390
  400 GOTO 60
  401 PRINT TAB(col1,29-(H1/100));" ";:COLOUR
 1:PRINT TAB(col1,28);CHR$(226);
  402 FOR x=1 TO 10
  403   SOUND 0,-15,6,1
  404 NEXT x
  405 GOTO 370
  410 CLS:PRINT TAB(0,0);CHR$(141);CHR$(129);
"----------- MOON LANDER ------------"'CHR$(1
41);CHR$(130);"----------- MOON LANDER ------
------"''
  420 PRINT" This is a real-time moon lander 
game inwhich you must land the lunar module o
n a small purple landing pad. You must    lan
d in the correct place at a rate of  descent 
not faster than -5.0 M/S."'
  430 PRINT CHR$(132);"Use the following comm
and keys:"''
  440 PRINT "          ";CHR$(134);"Z";CHR$(1
35);"= move left"'
  450 PRINT "          ";CHR$(134);"X";CHR$(1
35);"= move right"'
  460 PRINT "          ";CHR$(134);"*";CHR$(1
35);"= motor on"'
  470 PRINT "          ";CHR$(134);"?";CHR$(1
35);"= motor off"'
  480 PRINT TAB(6,24);CHR$(136);CHR$(132);"Pr
ess any key to start";
  490 IF INKEY$(1000)="" THEN GOTO 490
  500 RETURN
  510 H=2000:V=-20:m=1378:T=4800
  520 F1=2:F=378:E=1:col=15:y=8
  530 CLS:COLOUR 3
  540 FOR x=1 TO 256
  550   PLOT 69,INT(RND(1280)),INT(RND(940))+
80
  560 NEXT
  570 MOVE 0,0:PLOT 5,1280,0
  580 VDU 23,224,60,126,219,255,255,126,189,1
29
  590 VDU 23,225,24,60,60,60,24,24,0,0
  595 VDU 23,226,0,0,0,0,24,60,126,255
  600 VDU 19,1,5,0,0,0,19,2,4,0,0,0
  610 COLOUR 1
  620 PRINT TAB(20,28);"_"
  630 RETURN