AstroNUT V1.1 by Kevin Jessup 16-May-1991 Version 1.1 ----------- This version adds a bit of audio and corrects a minor bug: flag -19, the COMPLEX MODE flag, is now cleared to insure that 2-d vectors are produced when required. Also, all temporary global variables are cleared from the directory at the end of play. (Please allow time for cleanup when the game ends: wait for the HP48SX busy indicator to shut off.) Otherwise, the game is the same. Introduction ------------ AstroNUT is a lunar lander simulation for the 48SX. It supports 2-d travel (up, down, left, right) and a random terrain that is generated for each new game. All routines are in RPL so the screen updates are somewhat slow. I still find play acceptable however. The object of the game is to land on a more or less flat portion of the lunar surface with a horizontal velocity of zero and a vertical velocity of less than 5 feet per second. (Somewhat fast! Change it if you like.) You have a limited amount of fuel available to do this. Initial parameters ------------------ Altitude: 170 feet Vertical velocity: -20 feet per second. A "second" is not the usual unit of time that you are familiar with but how long it takes this game to execute its main loop! You will have to hit the thrust key quite often to slow down. Read on... Horizontal velocity: 5 feet per second. The direction (left or right) is random. The initial horizontal position is also random. Fuel: 100 units. In gallons, liters, cubic light-years or whatever you'd like to call it :-) Control keys ------------ 8: Apply upward thrust (One push equals thrust of 1/2 g) 4: Apply left thrust (Changes horizontal vel. by 1 ft/sec) 6: Apply right thrust (Changes horizontal vel. by 1 ft/sec) With each screen update, your downward velocity will increase due to the acceleration of gravity at a rate of 4 ft/s^2. It will require 2 hits of the vertical thrust (key 8) to exactly compensate for the acceleration due to gravity. Screen positioning ------------------ As you move to the left and right edges of the display, you will wrap around to the opposite side. There are "unlimited" vertical screens. You will wrap around at the top and bottom. When you reach the lowest screen, there will be a slight pause as the lunar surface is drawn. If you move above the lowest screen, the surface will be erased. The current "flight parameters" are displayed at the top right of the LCD. Loading ------- For the neophytes, those funny little characters at the start of these lines are HP48SX comment delimiters. You can transfer this entire file AS IS to your 48. The 48 will remove all the comments and load only the code. After transferring this file to your 48, recall the directory to the stack. Execute the BYTES command. You should get the following... Level 2: #5AB1h Level 1: 2707.5 Once you have successfully transferred the directory to your 48, just hit PLAY to start. Be patient...after a little practice, you should be able to land using only 100 units of fuel. You can modify the amount of fuel, thrust and acceleration due to gravity if you like. Study the code below to find out how. Have fun! This is "freeware" but if you'd like to send a few bucks, don't let that stop you! Kevin Jessup 9118 N 85th Milwaukee, WI 53224 (414)355-9752 Milwaukee HP48SX BBS 2400/1200/300 baud (414)362-2020 6PM to 7AM or all day Sunday