Old school 80's program

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
SCC
Coder
Posts: 12
Joined: Mon Oct 09, 2006 9:53 pm

Old school 80's program

Post by SCC »

I was digging through some old papers and found a page from a very old 3-2-1 Contact magazine (early 80's i think). It was a Basic Training section they put in at the end that had games to type out and try. I thought it would be cool to post it here for everyone, lol. It doesn't work very well, and it's rather short and cheesy, but i guess it might be fun to recode it so that it works a little better. (I used to have another, but i guess i lost it).

Code: Select all

10  DIM N$(6,2),H$(6),P$(6)
20  FOR X = 1 TO 6
30  READ A$:H$(X)=A$
40  READ BS:P$(X)=B$
50  NEXT X
60  S=12:I=0
70  FOR X = 1 to 6
80  FOR Y = 1 to 2
90  N$(X,Y)="0":NEXT Y:NEXT X
100 CLS:GOSUB 480
110 PRINT "PICK ONE:"
120 PRINT "1) GO TO SUPPLY CAVE"
130 PRINT "2) GO ON MAMMOTH HUNT"
140 PRINT "3) START OVER
150 INPUT R$:R=VAL(R$)
160 ON R GOTO 550,180,60
170 GOTO 100
180 CLS
190 C=INT(RND(1)*2)+1
200 IF C=2 THEN 250
210 PRINT "YOU HAVE SEARCHED ALL DAY."
220 IF N$(6,2)="1" THEN 240
230 PRINT "YOU HAVE NO FOOD. RETURN HOME.":GOTO 740
240 PRINT "YOU EAT YOUR EXTRA FOOD."
250 PRINT:PRINT "YOU FIND A MAMMOTH HERD."
260 IF N$(5,2)="1" THEN 300
270 C=INT(RND(1)*2)+1
280 IF C=1 THEN 310
290 PRINT "YOU CAN'T GET CLOSE. RETURN HOME.":GOTO 740
300 PRINT "YOU HIDE UNDER YOUR MAMMOTH SKIN."
310 IF N$(1,2)="1" THEN 330
320 PRINT "YOU HAVE NO SPEAR. RETURN HOME":GOTO 740
330 PRINT "YOU KILL A MAMMOTH!"
340 IF N$(4,2)="1" THEN 360
350 PRINT "YOU HAVE NO KNIFE. RETURN HOME":GOTO 740
360 PRINT "YOU CUT IT UP AND HEAD HOME"
370 C=INT(RND(1)*3)+1
380 IF C<1 THEN 430
390 PRINT "BUT IT STARTS TO SNOW"
400 IF N$(3,2)="1" THEN 420
410 PRINT "YOU DROP YOUR CATCH AND RUN HOME":GOTO 740
420 PRINT "YOU MAKE A FIRE AND STAY WARM."
430 PRINT "YOU ARE A MASTER HUNTER!!"
440 PRINT "PLAY AGAIN? Y/N"
450 INPUT R$
460 IF R$="Y" THEN 60
470 END
480 PRINT:PRINT "YOU HAVE:"
490 FOR X = 1 TO 6
500 IF N$(X,2)="0" THEN 520
510 PRINT N$(X,1)
520 NEXT X
530 IF I<1 THEN PRINT "NOTHING"
540 PRINT:RETURN
550 CLS
560 PRINT "WELCOME TO THE HUNT SUPPLY CAVE."
570 PRINT "YOU HAVE ";S;" SEASHELLS TO TRADE"
580 PRINT:GOSUB 480
590 FOR X = 1 TO 6
600 PRINT X") ";H$(X);" ";P$(X);"SHELLS
610 NEXT X
620 PRINT "7) LEAVE SUPPLY CAVE"
630 PRINT:PRINT "CHOOSE ITEM"
640 INPUT R$
650 R=VAL(R$): IF R>7 THEN 550
660 IF R<1 THEN 550
670 IF R=7 THEN 750
680 IF VAL(P$(R))=<S THEN 710
690 PRINT "NOT ENOUGH SHELLS"
700 FOR DE=1 TO 2500: NEXT DE:GOTO 550
710 I=I+1:N$(R,1)=H$(R):S=S-VAL(P$(R))
720 N$(R,2)="1"
730 GOTO 550
740 FOR DE=1 TO 3800:NEXT DE
750 GOTO 100
760 DATA SPEAR,4,DIGGING STICK,2
770 DATA FIRE-MAKING STONES,3,KNIFE,3
780 DATA MAMMOTH HIDE,3,EXTRA FOOD,2
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Post by sid6.7 »

:D


that brings back some old memories...thanks
BDZ
Coder
Posts: 49
Joined: Sun Nov 20, 2005 5:41 pm
Location: Wisconsin
Contact:

Post by BDZ »

I have some old 3-2-1 Contact magazines that have the programs in them. There was a "Hunt for Bigfoot", one where you manage a robot cookie factory, one where you chase your dog that was really lame, and my favorite, one where you were a stud and traveled room to room looking for food.
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Post by sid6.7 »

BDZ wrote:I have some old 3-2-1 Contact magazines that have the programs in them. There was a "Hunt for Bigfoot", one where you manage a robot cookie factory, one where you chase your dog that was really lame, and my favorite, one where you were a stud and traveled room to room looking for food.

you should post them too like the one above...
User avatar
commanderkeen
Newbie
Posts: 6
Joined: Fri Dec 29, 2006 7:38 pm
Location: Middle Earth
Contact:

Post by commanderkeen »

8)
My friend has a book full of BASIC programs like these.

I really should dig up my ZX spectrum and put the code on my PC

3-2-1 Contact magazines? I wonder if they'll be in my local second-hand books/magazines store...
seaBiscuit$
Coder
Posts: 45
Joined: Sun Nov 26, 2006 2:00 pm
Location: Champaign, Illinois

Post by seaBiscuit$ »

I guess that's what people would call "spaghetti code," but I love it! :D

Programs like this are so great because at first glance it looks completely unstructured, like somebody chewed up an ASCII character chart and spit it on the screen, but upon closer inspection, they reveal that they are actually very well put together.

I've looked at some programs like this, and I'm convinced now that there ARE things that a good-old-fashioned GOTOs can can handle better than any modern code structures. 8)

Please, somebody, anybody, put more on here if you have any like this!
SCC
Coder
Posts: 12
Joined: Mon Oct 09, 2006 9:53 pm

Post by SCC »

OMG, the stud one was the other one i had! That was the one i really wanted to try and recode, but unfortunatly, that was the one i lost. :(

also, the cookie factory sounds awsome! :)
BDZ
Coder
Posts: 49
Joined: Sun Nov 20, 2005 5:41 pm
Location: Wisconsin
Contact:

Post by BDZ »

I'd put 'em up, but I don't actually have them on a working computer. I only typed a few of them in anyway (at the time I was like 11 and a really slow typer.) I seem to recall a topic here a while back though that had a link to a 100+ MB zip of scans.
Post Reply