Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 100 REM BASIC Month 4: Lunar Corps
- 110 REM http://reddit.com/r/RetroBattlestations
- 120 REM written by FozzTexx
- 130 REM modified by EkriirkE
- 200 REM Clear screen and setup variables
- 210 CLS : RANDOMIZE TIMER
- 220 COLS = 80: ROWS = 24
- 230 ITER = 10
- 300 GOSUB 2510
- 310 YS = SQR(2) * SQR(LY) * ITER - 1
- 320 XV = LX / YS: YV = 0
- 330 X = 1: Y = 1
- 400 LE$ = SPACE$(9)
- 410 LM$ = "(I)/T\": ML$ = "(I)/T\ V "
- 420 FOR I = 1 TO YS
- 430 SP$ = LE$: GOSUB 1510
- 440 YV = YV + .9 / (ITER * ITER)
- 450 X = X + XV: Y = Y + YV
- 460 IF Y >= ROWS / 2.5 THEN SP$ = ML$ ELSE SP$ = LM$
- 470 GOSUB 1510
- 480 J = TIMER: WHILE TIMER - J < 1 / ITER: WEND
- 490 NEXT I
- 500 SP$ = LE$: GOSUB 1510
- 510 X = LX: Y = LY
- 520 SP$ = LM$: GOSUB 1510
- 530 SP$ = "The Eagle has landed": LOCATE ROWS / 2, (COLS - LEN(SP$)) / 2: PRINT SP$
- 999 END
- 1500 REM EkriirkE's Draw sprite in SP$ at X, Y
- 1510 IF Y < 1 OR Y >= ROWS OR X < 1 OR X >= COLS THEN RETURN
- 1520 FOR J = 1 TO LEN(SP$) STEP 3
- 1530 LOCATE Y + J / 3, INT(X): PRINT MID$(SP$, J, 3)
- 1540 NEXT
- 1550 RETURN
- 2500 REM EkriirkE's Draw lunar surface
- 2510 DEEP = 4: WIDE = 3
- 2520 Y = INT(RND(1) * DEEP) + 1: PC = 0: LX = 0
- 2530 FOR I = 1 TO COLS
- 2540 OY = Y
- 2550 IF PC = 0 THEN Y = Y + SGN(INT(RND(1) * 7) - 3)
- 2560 IF Y < 1 THEN Y = 1
- 2570 IF Y > DEEP THEN Y = DEEP
- 2580 IF LI + 1 = I AND Y = OY THEN GOTO 2550
- 2590 IF Y > OY THEN LOCATE ROWS - Y + 1: PRINT "/"; ELSE LOCATE ROWS - Y
- 2600 IF Y < OY THEN PRINT "\";
- 2610 IF Y = OY THEN PRINT "_"; : PC = PC + 1: IF PC >= WIDE THEN PC = 0: LI = I: IF LX = 0 OR RND(1) > .8 THEN LX = I - INT(WIDE / 2 + .5): LY = ROWS - Y - 1
- 2615 J = TIMER: WHILE TIMER - J < .05: WEND
- 2620 NEXT
- 2630 RETURN
Add Comment
Please, Sign In to add comment