The Best of Creative Computing Volume 1 (published 1976)

 `Page 268 << PREVIOUS >> NEXT Jump to page: Go to contents Go to thumbnails`

Splat (Open a parachute at the last moment, BASIC computer game, BASIC program listing, sample run)

```Another new game from Creative Computing…

SPLAT

OPEN A PRACHUTE AT THE LAST MOMENT

By John F. Yegge

Oak Ridge Associated Universities

SPLAT simulates a parachute jump in wich you try to open your parachute at the
last possible moment without going splat! You may select your own terminal
velocity or let the computer do it for you. You may also select the acceleration
due to gravity or, again, let the computer do it in which case you might wind up
on any of the eight planets (out to Neptune), the moon, or sun.

The computer then tells you the height you're jumping from and ask for the
seconds of free fall. It then divides you free fall time into eight intervals
and gives you progress reports on your way down. The computer also keeps track
of all prior jumps in the file PARACHUTE and lets you know how you compared with
previous successful jumps. You can easily convert SPLAT to your version of BASIC
by eliminating the file which keeps track of previous jumps although if you have
file capabilities, use them – the game is that much more fun!

WELCOME TO 'SPLAT' - - THE GAME THAT SIMULATES A PARACHUTE JUMP. TRY TO OPEN
YOUR CHUTE AT THE LAST POSSIBLE MOMENT WITHOUT GOING SPLAT.

SELECT YOUR OWN TERMINAL VELOCITY (YES OR NO) ? NO

OK. TERMINAL VELOCITY = 796 MI/HR

WANT TO SELECT ACCELERATION DUE TO GRAVITY (YES OR NO) ? NO

FINE. YOU'RE ON MERCURY. ACCELERATION=12.2FT/SEC/SEC

ALTITUDE                       = 9297 FT

TERM.VELOCITY           = 1167.47 FT/SEC + −5%

ACCELERATION            = 12.2 FT/SEC/SEC + −5%

SET THE TIMER FOR YOU FREEFALL.

HOW MANY SECONDS?  8

HERE WE GO.

TIME (SEC)                 DIST TO FALL (FT)
- - - - - - - - - -              - - - - - - - - - - - - - - - - -
0                                        9297
1                                        9290.88
2                                        9272.51
3                                        9241.89
4                                        9199.02
5                                        9143.91
6                                        9076.55
7                                         8996.94
8                                         8905.09

CHUTE OPEN

CONSERVATIVE AREN'T YOU? YOU RANKED ONLY 9 IN THE 14 SUCCESSFUL JUMPS BEFORE
YOURS.

DO YOU WANT TO PLAY AGAIN? YES

SELECT YOUR OWN TERMINAL VELOCITY (YES OR NO)? NO

OK. TERMINAL VELOCITY = 740 MI/HR

WANT TO SELECT ACCELERATION DUE TO GRAVITY (YES OR NO)? NO

THEN YOU'RE ON NEPTUNE. ACCELERATION=39.6FT/SEC/SEC

ALTITUDE                         = 5189 FT

TERM.VELOCITY             = 1065.33 FT/SEC + −5%

ACCELERATION              = 39.6 FT/SEC/SEC + −5%

SET THE TIMER FOR YOUR FREEFALL.

HOW MANY SECONDS? 18

HERE WE GO.

TIME (SEC)                 DIST TO FALL (FT)
- - - - - - - - - -              - - - - - - - - - - - - - - - - -
0                                     5189
2.25                                5089.74
4.5                                  4791.95
6.75                                4295.63
9                                     3600.78
11.25                              2707.4
13.5                                1615.5
15.75                              325.072
16.2678                        SPLAT

I'LL GIVE YOU ANOTHER CHANCE.

DO YOU WANT TO PLAY AGAIN? YES

30 OPEN "PARACHUTE" AS FILE 1%

40 DIM *1%, A(4000)

55 RANDOMIZE

95 PRINT "WELCOME TO ' SPLAT ' - - THE GAME THAT SIMULATES A PRACHUTE"

96 PRINT "JUMP, TRY TO OPEN YOUR CHUTE AT THE LAST POSSIBLE "

97 PRINT "MOMENT WITHOUT GOING SPLAT."

118 PRINT\PRINT\D1*0\V*0\A*0\N*0\M*0\D1*INT (9001*AND(1)+1000)

119 PRINT " SELECT YOUR OWN TERMINAL VELOCITY (YES OR NO)*J\INPUT A13"

120 IF A13 * "NO" THEN 120 ELSE IF A13 * "YES" THEN 123

121 PRINT *"YES" OR "NO" PLEASE * J\INPUT A13\GOTO 120

123 PRINT "WHAT TERMINAL VELOCITY (MI/HR)" J\INPUT V1

125 V1=V1*(5200/3600) \V*V1*((V1*AND(0))/20)=((V1*AND(0))/20) \GOTO 135

128 V1=INT (1000*AND(0))

130 PRINT "OK. TERMINAL VELOCITY * "V1"MI/HR"

131 V1=V1* (5200/3600) \V*V1+((V1*AND (0))/20)=((V1*AND(0))/20)

135 PRINT "WANT TO SELECT ACCELERATION DUE TO GRAVITY (YES OR NO)";

136 INPUT B13

140 IF B13 *"NO" THEN 150 ELSE IF B13*"YES" THEN 143

141 PRINT *"YES" OR "NO" PLEASE*J\INPUT B13\GOTO 140

143 PRINT "WHAT ACCELERATION (FT/SEC/SEC)" J\INPUT A2

145 A*A2+((A2*AND(0))/20)=((A2*AND(0))/20)\GOTO 205

150 ON INT (1*(10*AND(0))) GOTO151, 152, 153, 154, 155, 156, 157, 158, 159, 160
.

151 PRINT "FINE, YOU'RE ON MERCURY. ACCELERATION=12.2FT/SEC/SEC" \GOTO161

152 PRINT "ALRIGHT. YOU'RE ON VENUS. ACCELERATION=28.3FT/SEC/SEC" \GOTO162

153 PRINT "THEN YOU'RE ON EARTH. ACCELERATION=32.16FT/SEC/SEC" \GOTO 163

154 PRINT "FINE.YOU'RE ON THE MOON. ACCELERATION=5.15FT/SEC/SEC" \GOTO 164

155 PRINT "ALRIGHT.YOU'RE ON MARS. ACCELERATION=12.5FT/SEC/SEC" \GOTO 165

156 PRINT "THEN YOU'RE ON JUPITER. ACCELERATION=85.2FT/SEC/SEC" \GOTO 166

157 PRINT "FINE.YOU'RE ON SATURN. ACCELERATION=37.6FT/SEC/SEC" \GOTO 167

158 PRINT "ALRIGHT.YOU'RE ON URANUS. ACCELERATION=33.8FT/SEC/SEC" \GOTO 168

159 PRINT "THEN YOU'RE ON NEPTUNE. ACCELERATION=39.6FT/SEC/SEC" \GOTO 169

160 PRINT "FINE.YOU'RE ON THE SUN. ACCELERATION=896FT/SEC/SEC" \GOTO 170

161 A2*12.2\GOTO 145

162 A2*28.3\GOTO 145

163 A2*32.16\GOTO 145

164 A2*5.15\GOTO 145

165 A2*12.5\GOTO 145

166 A2*85.2\GOTO 145

167 A2*37.6\GOTO 145

168 A2*33.8\GOTO 145

169 A2*39.6\GOTO 145

170 A2*896\GOTO 145

205 PRINT

206 PRINT "    ALTITUDE                      *"D1"FT"

207 PRINT "    TERM. VELOCITY         *"V1"FT/SEC  + −5%"

208 PRINT "     ACCELERATION           *"A2""FT/SEC/SEC + −5%"

210 PRINT "SET THE TIMER FOR YOUR FREEFALL."

211 PRINT "HOW MANY SECONDS"J\INPUT T

215 PRINT "HERE WE GO."

217 PRINT

218 PRINT "TIME (SEC)", "DIST TO FALL (FT)"

219 PRINT "- - - - - - - - - -", "- - - - - - - - - - - - - - - - -"

300 FOR I=0 TO T STEP (T/8)

310 IF I>V/A GOTO 400

320 IF D<=0 GOTO 1000

340 PRINT I, D

350 NEXT I

360 GOTO 500

400 PRINT "TERMINAL VELOCITY REACHED AT T PLUS"V/A"SECONDS"

405 FOR I=I TO T STEP (T/8)

410 D=D1=((V*2/(2*A))+(V*(I=(V/A))))

420 IF D<=0 GOTO 1010

430 PRINT I, D

440 NEXT I

450 GOTO 500

500 PRINT "CHUTE OPEN"

510 K=0\K1=0

530 FOR I=1 TO 4000

550 IF A(I)=0 GOTO 620

560 K=K+1

570 IF D>=A(I) GOTO 600

580 K1=K1+1

600 NEXT I

620 A(I)=D

630 I=I-1

650 IF K=K1<=*. 1*K GOTO 700

660 IF K=K1<=*. 25*K GOTO 710

670 IF K=K1<=*. 5*K GOTO 720

680 IF K=K1<=*. 75*K GOTO 730

690 IF K=K1<=*. 9*K GOTO 740

695 GOTO 750

700 PRINT "*WOW! THAT'S SOME JUMPING. OF THE "K"SUCCESSFUL JUMPS"

701 PRINT "BEFORE YOURS, ONLY "K=K1"OPENED THEIR CHUTES LOWER THAN"

702 PRINT "YOU DID."

703 GOTO 2000

710 PRINT "PRETTY GOOD! " K"SUCCESSFUL JUMPS PRECEDED YOURS AND ONLY"

711 PRINT K=K1 "OF THEN GOT LOWER THAN YOU DID BEFORE THEIR CHUTES"

712 PRINT "NOT BAD. THERE HAVE BEEN "K"SUCCESSFUL JUMPS BEFORE YOURS."

720 PRINT "YOU HERE BEATEN OUT BY "K=K1"OF THEM." \GOTO 2000

730 PRINT "CONSERVATIVE AREN'T YOU? YOU RANKED ONLY"K=K1"IN THE"

731 PRINT K"SUCCESSFUL JUMPS BEFORE YOURS." \GOTO 2000

740 PRINT "HUMPH; DON'T YOU HAVE ANY SPORTING BLOOD? THERE WERE"

741 PRINT K"SUCCESSFUL JUMPS BEFORE YOURS AND YOU CAME IN"K1"JUMPS"

742 PRINT "BETTER THAN THE WORST. SHAPE UP!!!" \GOTO 2000

750 PRINT "HEY! YOU PULLED THE RIP CORD MUCH TOO SOON. "K"SUCCESSFUL"

751 PRINT "JUMPS BEFORE YOURS AND YOU CAME IN NUMBER "K=K1"; GET WHIT IT;"

752 GOTO 2000

600 PRINT "REQUIESCAT IN PACE." \GOTO 1950

601 PRINT "MAY THE ANGEL OF HEAVEN LEAD YOU INTO PARADISE" \GOTO 1950

602 PRINT "REST IN PEACE" \GOTO 1950

603 PRINT "SON-OF-A-GUN" \GOTO 1950

604 PRINT "*5%&&%;\$"\GOTO 1950

605 PRINT "A KICK IN THE PANTS IS A BOOST IF YOU'RE HEADED RIGHT" \GOTO 1950

606 PRINT "HMMM. SHOULD HAVE PICKED A SHORTER TIME." \GOTO 1950

607 PRINT "MUTTER. MUTTER, MUTTER." \GOTO 1950

608 PRINT "PUSHING UP DAISIES." \GOTO1950

609 PRINT "EASY COME, EASY GO." \GOTO 1950

1000 PRINT SQR (2*D1/A), "SPLAT"

1005 ON INT (1+(10*AND(0)))GOTO 800, 801, 802, 803, 804, 805, 806, 807, 808,809

1010 PRINT (V/A)+((D1=(VA2/(2*A)))/V), "SPLAT"

1020 GOTO 1005

1950 PRINT "I'LL GIVE YOU ANOTHER CHANCE." \GOTO 2000

2000 PRINT "DO YOU WANT TO PLAY AGAIN"J\INPUT Z5

2001 IF Z5*"YES" GOTO 118

2002 IF Z5*"NO" GOTO 2005

2003 PRINT "YES OR NO" \GOTO 2000

2005 PRINT "PLEASE"J\INPUT Z5\IF Z5*"YES" THEN 118 ELSE 2007

2007 PRINT "SSSSSSSSSS." \GOTO 2046

2046 CLOSE 1%

9999 ENDPage 268        << PREVIOUS        >> NEXT        Jump to page:                Go to contents        Go to thumbnails

<!--