Moonlander.BAS 11 Oct, 2025 Click the window to enter text. Each turn enter the amount of Thrust you want to apply to slow your descent. If you run out of fuel or fall too fast, you will crash. Try not to crash. Adapted from a listing in Tim Hartnell's Giant Book of Computer Games, refactored and adapted for the Basic Anywhere Machine. <h2>The Listing</h2> PRINT TAB(11); "**********************************************************" PRINT TAB(11); "**********************************************************" PRINT TAB(11); "** **" PRINT TAB(11); "** MOONLANDER **" PRINT TAB(11); "** **" PRINT TAB(11); "** As seen in Tim Hartnel's Giant Book of Computer Games**" PRINT TAB(11); "** Converted and refactored by Michael Coorlim **" PRINT TAB(11); "** **" PRINT TAB(11); "**********************************************************" PRINT TAB(11); "**********************************************************" PRINT:PRINT:PRINT Stripped out all the line numbers and implemented labels. REM ** Initialization ** HS = -10000 : REM ** HIGH SCORE input "Instructions? (Y/N)" A$ if LEFT$(A$,1) = "Y" or LEFT$(A$,1) = "y" THEN ?:?"In Moonlander you are trying to land safely on the moon." ?"Your only control is how much thrust to apply on any given turn." ?"This uses up your limited fuel, but slows your descent." ?"Try and slow enough so that your landing doesn't cause a crater." ?"And, of course, without running out of fuel." ?"Press a key to continue." END IF SLEEP Added instructions; the listing lacked them. INIT: VELOCITY = -20-INT(RND(1)*60): REM Initial velocity ALTITUDE = 1200 + INT(RND(1)*380):REM Height FUEL = 320 + INT(RND(1)*90): REM Fuel Original variable names were A, B, and C. I've renamed them. Also had to change the structure of the RND statements from (RND(number)) to RND(1)*number). START_LOOP: CLS PRINT:PRINT:PRINT ALTITUDE = INT(ALTITUDE):VELOCITY = INT(VELOCITY):FUEL = INT(FUEL) REM ** Display ** PRINT "Altitude:";ALTITUDE,"Velocity: ";VELOCITY PRINT" Fuel:";FUEL REM ** ...
First seen: 2025-10-19 00:59
Last seen: 2025-10-19 09:00