The Valley game by KAYDE Software for NewBrain computer

Games for Spectrum, C64, Amstrad, Amiga, Apple ][ and the rest of the 8-bit and 16-bit platforms. Pleas for help, puzzles, bug reports etc.

Moderator: Alastair

Post Reply
Message
Author
Colin Appleby
Posts: 93
Joined: Wed Mar 16, 2016 10:05 pm

The Valley game by KAYDE Software for NewBrain computer

#1 Post by Colin Appleby » Fri Sep 02, 2016 3:08 pm

Rooting around my Attic I found an original KAYDE tape for the NewBrain of "The Valley" game.
Have run it on an actual NewBrain computer and it works great. There is an Intro program and Main program on the tape.
I am presently getting a Basic listing which is massive, then will input it into the NewBrain Emulator to run on the PC.
I was never sure if "The Valley" was actually released for the NewBrain by Kayde Software, but now I know for sure.
Have seen The Valley game on other computers but never a NewBrain actual version.

Regards
Colin

User avatar
Gunness
Site Admin
Posts: 1826
Joined: Tue Dec 07, 2004 7:04 pm
Location: Copenhagen, Denmark
Contact:

Re: The Valley game by KAYDE Software for NewBrain computer

#2 Post by Gunness » Wed Sep 07, 2016 3:03 pm

I think we had the game in our database for a while, but it seemed to be more of an RPG than a text adventure, so I deleted it. Was that correct?

Colin Appleby
Posts: 93
Joined: Wed Mar 16, 2016 10:05 pm

Re: The Valley game by KAYDE Software for NewBrain computer

#3 Post by Colin Appleby » Fri Sep 09, 2016 8:08 pm

The KAYDE Software tape of "The Valley" for NewBrain computer has now been converted by me to run on Newbrain Emulator running on a PC. It will also run on an actual NewBrain computer circa 1982. The game is both text and simple graphic screen. This Valley game has both Intro and Main programs. I have also converted all the KAYDE adventure except Arcane Quest, Picnic Adventure and The Roundsby Incident which I do not think were ever released. If anybody does have a listing or software for these KAYDE games, I would appreciate a copy. The Valley game is available for download from www.newbrainemu.eu which include Basic listings, Screen snapshot and Cover.

Regards

Colin

User avatar
jgerrie
Posts: 287
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: The Valley game by KAYDE Software for NewBrain computer

#4 Post by jgerrie » Sat Sep 24, 2016 4:45 pm

Looks neat. And promising for a possible port to the TRS-80 MC-10. Thanks for sharing the code!

Jim

Colin Appleby
Posts: 93
Joined: Wed Mar 16, 2016 10:05 pm

Re: The Valley game by KAYDE Software for NewBrain computer

#5 Post by Colin Appleby » Sun Sep 25, 2016 3:00 am

Hello Jim
Hope you manage to convert the below NewBrain Basic listing to the TRS-80 MC-10 computer. Good Luck ...
Listing for "The Valley" game by KAYDE Software:

1 OPEN#0,0,"S25":CLOSE#5:OPEN#5,5:CLOSE#6:OPEN#6,6
2 PUT 23,72
5 ZX=5
10 PUT31,10,10,10,10,10:?" THE VALLEY "
12 REM FROM ORIGINAL KAYDE TAPE FOR NEWBRAIN COMPUTER
13 REM DIGITIZED BY COLIN APPLEBY 8 SEPT 2016
14 REM DEBUGGED BY CHRIS DESPINIDIS
15 GOSUB1600
17 GOSUB58000
100 DIMD(3),P(8),N(8),Q(1),T(5),R(1)
110 DIMM$(18),MS(18),N1(18),X1(6),Y1(6),XX(6),YY(6)
120 VG$="":GC$="":F$="":DL$="":TS=0:TN=0:CF=0
123 FORI=0TO54:READG:NEXTI
125 RANDOMIZE
300 FORI=0TO6:X1(I)=INT(37*RND)+2:Y1(I)=INT(14*RND)+2:NEXTI
330 FORI=0TO18
336 LETY=INT(7*RND)+9
337 FORZ=0TO6:IFY1(Z)=YTHEN336
338 NEXTZ
340 READM$(I):READMS(I):READN1(I)
350 NEXTI
400 LETXX(1)=(X1(4))+1:LETYY(1)=Y1(4)
402 LETXX(3)=2:LETYY(3)=8
404 LETXX(4)=2:LETYY(4)=8
406 LETXX(2)=2:LETYY(2)=8
408 LETXX(5)=2:LETYY(5)=8
409 LETXX(6)=2:LETYY(6)=8
410 PUT22,(XX(0)),(YY(0))
1000 PUT31,10,10,10:?" LOAD A CHARACTER FROM TAPE? (Y/N)":VG$="yn":GOSUB1500
1020 PUT31,10,10,10:INPUT(" CHARACTER'S NAME *")J$
1030 IFJ$=""THEN1020
1031 IFASC(J$)=13THEN1020
1040 IFLEN(J$)>=16THEN?"TOO LONG":GOTO1020
1050 IFGC$="n"THEN1240
1060 PUT31,10,10,10,10:?" INSERT TAPE AND PRESS PLAY ":GOSUB1600
1070 OPENIN#100,1,J$
1080 LINPUT#100,P$
1090 INPUT#100,TS
1100 INPUT#100,EX
1110 INPUT#100,TN
1120 INPUT#100,CS
1130 INPUT#100,PS
1140 INPUT#100,T(0)
1150 INPUT#100,T(1)
1160 INPUT#100,T(2)
1170 INPUT#100,C1
1180 INPUT#100,P1
1190 CLOSE#100
1220 C=150
1230 GOTO1400
1240 PUT31,10,10,10:?" CHARACTER TYPES..... CHOOSE CAREFULLY":?:?" WIZARD";:PUT
9,9,9:?"(1)":?:?" THINKER";:PUT9,9:?"(2)"
1250 ?:?" BARBARIAN";:PUT9,9:?"(3) KEY 1-5":?:?" WARRIOR";:PUT9,9:?"(4)":?:?"
CLERIC";:PUT9,9,9:?"(5)"
1310 GET#5,GC$:IFGC$=""THEN1310
1320 A=ASC(GC$)
1330 IFA=49THENP$="WIZARD":P1=2:C1=0.5:CS=22:PS=28
1340 IFA=50THENP$="THINKER":P1=1.5:C1=0.75:CS=24:PS=26
1350 IFA=51THENP$="BARBARIAN":P1=0.5:C1=2:CS=28:PS=22
1360 IFA=52THENP$="WARRIOR":P1=1.25:C1=1:CS=26:PS=24
1370 IFA=53THENP$="CLERIC":P1=1:C1=1:CS=25:PS=25
1380 IFA<49ORA>53THENP$="DOLT":P1=1:C1=1:CS=20:PS=20
1390 EX=5:C=150
1400 PUT31,10,10,10,10,10:?" GOOD LUCK ";J$;" THE ";P$
1420 DF=250:DL$="D":GOSUB36000
1430 GOSUB10000
1440 DF=5:GOSUB36000
1450 GOTO2000
1500 GET#5,GC$:IFGC$=""THEN1500
1510 FORI=1TOLEN(VG$)
1520 IFMID$(VG$,I,1)=GC$THENRETURN
1530 NEXTI
1540 GOTO1500
1600 PUT12:FORI=1TO20:PUT10:NEXTI:PUT14:?" ** PRESS ANY KEY TO CONTINUE **
":PUT15
1610 GET#5,GC$:IFGC$=""THEN1610
1620 RETURN
1700 FORI=1TO10:GET#6,GC$:NEXTI
1710 TV=0
1720 FORI=1TO(ZX*15)
1730 GET#6,GC$:IFGC$=""ORASC(GC$)=0THEN1750
1740 GOTO1770
1750 NEXTI
1760 TV=1
1770 RETURN
2000 Q=XX(S):R=YY(S)
2010 C=C+10
2030 GOSUB20000:?" YOUR MOVE... WHICH WAY? ":PUT15:GOTO2045
2040 GOSUB20000:?" ON THE PATH... WHICH WAY? ":PUT15:DF=5:GOSUB36000
2045 PUT22,Q,R :Q=XX(S):R=YY(S):PUT22,Q,R
2050 FORI=1TO10:GET#6,GC$:NEXTI
2060 GET#6,GC$:IFGC$="e"THEN45000
2070 A=ASC(GC$):IFA=0THEN2060
2080 IFA=8THENQ=Q-1:IFQ<=1THENQ=1
2090 IFA=10THENR=R+1:IFR>=17THENR=17
2100 IFA=11THENR=R-1:IFR<=1THENR=1
2110 IFA=26THENQ=Q+1:IFQ>=40THENQ=40
2111 PUT22,Q,R
2112 PUT20:GET#0,A$:B=ASC(A$)
2120 PUT6,22,Q,R
2125 TN=TN+1:IFB=32THENGOTO2190
2130 IFB=160ORB=114THENTN=TN-1:GOTO2000
2131 IFB=226ORB=106THEN48000
2140 IFB=242ORB=109ORB=173ORB=254THEN9000
2150 IFB=234ORB=113THEN9090
2160 IFB=124THEN15000
2170 IFB=189THENC=C-20:IFC<=0THEN55000
2180 IFB=42THEN2800
2190 PUT22,Q,R :XX(S)=Q:YY(S)=R
2200 IFB=107ORB=108THENGOTO2040
2210 RF=RND
2220 IFRF<0.33THENGOTO3000
2230 IFRF>0.75THEN2300
2240 GOSUB20000:?" NOTHING HERE LOOK ON! ":PUT15:DF=80
2250 GOSUB36000
2260 GOTO2000
2300 RF=INT(6*RND)+1
2310 ONRFGOSUB2340,2380,2380,2410,2410,2440
2320 DF=80:GOSUB36000
2330 GOTO2000
2340 GOSUB20000:?" CIRCLE OF EVIL RUN ":PUT15
2350 CS=CS-INT((FL+1)/2):C=C-20
2360 IFC<=0THENGOTO55000
2370 RETURN
2380 GOSUB20000:?" A HOARD OF GOLD ":PUT15
2390 TS=TS+INT(FL*(100*RND+100)):RETURN
2410 GOSUB20000:?" * YOU FEEL DEEP MAGIC ALL AROUND * ":PUT15
2415 PUT22,Q,R
2430 GOTO2450
2440 GOSUB20000:?" A PLACE OF POWER..... ":PUT15
2450 PS=PS+2+INT(FL*P1):CS=CS+1+INT(FL*C1):C=C+25
2460 RETURN
2800 REM
2810 RN=RND
2820 IFS=6ANDRN>0.95ANDT(1)=6ANDT(2)=0ANDRT>25THENT(2)=1:GOTO2870
2830 IFS=5ANDRN>0.85ANDT(0)=0THENT(0)=1:GOTO2880
2840 IFS=4ANDRND>0.7ANDT(0)=1ANDT(1)<6ANDFL>T(1)THEN2890
2850 IFRN>0.43THENGOSUB20000:?" A WORTHLESS BAUBLE ":PUT15:GOTO
2940
2860 GOSUB20000:?" A PRECIOUS STONE ! ":PUT15:GOTO2930
2870 GOSUB20000:?" YOU FIND EVANN AS HELM ":PUT15:GOTO2930
2880 GOSUB20000:?" ALARIANS AMULET EMPTY ":PUT15:GOTO2930
2890 GOSUB20000:?" AN AMULET STONE... ":PUT15
2900 DF=60:DL$="D":GOSUB36000
2910 IFRN>0.85THENGOSUB20000:?" ...BUT THE WRONG ONE! ":PUT15:GOTO
2940
2920 GOSUB20000:?" ...THE STONE FITS! ":PUT15:T(1)=T(1)+1
2930 TS=TS+100*(T(0)+T(1)+T(2)+FL)
2940 DF=80:GOSUB36000
2950 PUT22,Q,R,32:GOTO2190
3000 GOSUB20000:?" * * BEWARE YOU MEET * * ":PUT15
3005 GOSUB20000:PUT11,14:?" ":PUT15
3010 MS=0:N=0:CF=1
3020 RF=INT(17*RND):IFRF>9ANDRND>.85THEN3020
3030 IFB=189THENRF=INT(2*RND)+17
3040 IFRF=16ANDRND<.7THEN3020
3050 IFFL<5ANDRF=15THEN3020
3060 X$=LEFT$(M$(RF),1)
3070 FORI=1TOLEN(F$)
3080 IFMID$(F$,I,1)=X$THEN3110
3090 NEXTI
3100 GOTO3020
3110 M$=RIGHT$(M$(RF),LEN(M$(RF))-1)
3120 IFMS(RF)=0THEN3150
3130 MS=INT((CS*0.3)+MS(RF)*FL^.2/(RND+1))
3140 IFN1(RF)=0THEN3160
3150 N=INT(N1(RF)*FL^.2/(RND+1))
3160 U=INT((RF+1)*(FL^1.5))
3170 GOSUB20000:?" ":PUT15
3180 GOSUB20000:?" AN EVIL ";M$:PUT15
3190 DF=80:GOSUB36000
3500 IFRND<.6THEN4000
3510 GOSUB20000:?" YOU HAVE SURPRISE A/R?":PUT15
3520 GOSUB1700
3530 IFGC$="r"THEN3900
3540 IFTV=1THEN3600
3550 IFGC$<>"a"THEN4000
3560 DF=30:DL$="D":GOSUB36000
3570 GOSUB20000:?" * * STRIKE QUICKLY * * ":PUT15
3580 GOSUB1700
3590 IFTV=0THEN3620
3600 GOSUB20000:?" * * TOO SLOW TOO SLOW * * ":PUT15
3610 HF=0:GOTO3830
3620 E=29*LOG(EX)/3.14
3630 IFGC$="s"THEN4500
3640 IFMS=0THENGOSUB20000:?" YOUR SWORD IS USELESS ":PUT15:GOTO383
0
3650 C=C-1
3660 IFC<=0THENGOSUB20000:?" ** YOU TRY TO HARD ** ":PUT15:GOTO550
00
3670 RF=10*RND
3680 IFGC$="h"AND(RF<5ORCS>MS*4)THENZ=2:GOTO3730
3690 IFGC$="b"AND(RF<7ORCS>MS*4)THENZ=1:GOTO3730
3700 IFGC$="l"AND(RF<9ORCS>MS*4)THENZ=0.3:GOTO3730
3710 GOSUB20000:?" YOU MISSED IT!!! ":PUT15
3720 HF=0:GOTO3830
3730 IFHF=1THEND=MS+INT(9*RND):HF=0:GOTO3760
3740 D=INT((((CS*50*RND)-(10*MS)+E)/100)*Z):IFD<0THEND=0
3750 IFCS>(MS-D)*4THENHF=1
3760 MS=MS-D
3770 GOSUB20000:?" * * * * A HIT!!! * * * * ":PUT15
3780 DF=60:DL$="D":GOSUB36000
3790 IFD=0THENGOSUB20000:?" BUT NO DAMAGE ":PUT15:HF=0:GOT
O3830
3800 GOSUB20000:?" IT TAKES ";D;" DAMAGE ":PUT15:IFMS<=0THEN3860
3810 IFHF=1THENDF=30:DL$="D":GOSUB36000
3820 IFHF=1THENGOSUB20000:?" "PUT15:GOSUB20000:?" TH
E ";M$;" STAGGERS":PUT15
3830 DF=110:GOSUB36000
3840 IFHF=1THEN3570
3850 GOTO4000
3860 GOSUB20000:?" KILLING THE MONSTER ":PUT15
3870 EX=EX+U:HF=0:CF=0
3880 DF=80:GOSUB36000
3890 GOTO2010
3900 GOSUB20000:?" KNAVISH COWARD ":PUT15:CF=0
3910 GOTO3880
4000 GOSUB20000:?" IT ATTACKS ":PUT15
4010 DF=50:DL$="W":GOSUB36000
4020 IFMS=0THEN4300
4030 IFMS<NANDN>6ANDRND<.5THEN4300
4040 MS=MS-1:IFMS<=0THEN4240
4050 RF=INT(11*RND)+1
4060 ONRFGOTO4070,4080,4090,4100,4110,4110,4110,4120,4120,4130,4140
4070 GOSUB20000:?" IT SWINGS AND MISSES ":PUT15:GOTO4280
4080 GOSUB20000:?" YOU DEFLECT THE BLOW ":PUT15:GOTO4280
4090 GOSUB20000:?" BUT HESITATES ":GOTO4280
4100 Z=3:GOSUB20000:?" IT HITS YOUR HEAD ":PUT15:GOTO4150
4110 Z=1.5:GOSUB20000:?" YOUR CHEST IS HIT ":PUT15:GOTO4150
4120 Z=1:GOSUB20000:?" A HIT TO YOUR SWORDARM ":PUT15:GOTO4150
4130 Z=1.3:GOSUB20000:?" A BLOW TO YOUR BODY ":PUT15:GOTO4150
4140 Z=.5:GOSUB20000:?" IT CATCHES YOUR LEGS ":PUT15
4150 DF=60:DL$="D":GOSUB36000
4160 G=INT((((MS*75*RND)-(10*CS)-E)/100)*Z)
4170 IFG<0THENG=0:GOSUB20000:?" SAVED BY YOUR ARMOUR ":PUT15:GOT
O4280
4180 C=C-G
4190 IFG>9THENCS=INT(CS-G/6)
4200 IFG=0THENGOSUB20000:?" SHAKEN.. BUT NO DAMAGE ":PUT15:GOTO4280
4210 GOSUB20000:?" ":PUT15:GOSUB20000:?"
YOU TAKE ";G;" DAMAGE":PUT15
4220 IFCS<=0ORC<=0THEN55000
4230 GOTO4280
4240 GOSUB20000:?" DYING IN THE ATTEMPT ":PUT15
4250 EX=INT(EX+U/2):CF=0
4260 DF=100:GOSUB36000
4270 GOTO2010
4280 DF=100:GOSUB36000
4290 GOTO3570
4300 GOSUB20000:?" THROWS A LIGHTNING BOLT ":PUT15
4310 G=INT(((180*N*RND)-(PS+E))/100):N=N-5:IFG>9THENN=N-INT(G/5)
4320 DF=20:DL$="W":GOSUB36000
4330 IFN<0THENN=0:GOTO4240
4340 IFRND<.25THEN4410
4350 IFG<=0THENG=0:GOTO4400
4360 GOSUB20000:?" * * * IT STRIKES HOME * * * ":PUT15
4370 DF=20:GOSUB36000
4380 C=C-G:IFG>9THENPS=INT(PS-G/4)
4390 GOTO4210
4400 GOSUB20000:?" YOUR PSI PROTECTS YOU ":PUT15:GOTO4280
4410 GOSUB20000:?" MISSED YOU ":PUT15:GOTO4280
4500 GOSUB20000:?" WHICH SPELL? ":PUT15:GOSUB1700
4510 IFTV=1THENGOSUB36000
4520 IFASC(GC$)>48ANDASC(GC$)<=51THEN4540
4530 GOSUB20000:?" NO SUCH SPELL ":PUT15:GOTO4640
4540 IF4*PS*RND<=NTHEN4590
4550 ONVAL(GC$)GOSUB5000,5200,5400
4560 ONSCGOTO4620,4640,4660,4570,4600,4580,4590
4570 GOSUB20000:?" IT IS BEYOND YOU ":PUT15:GOTO4640
4580 GOSUB20000:?" BUT THE SPELL FAILS ":PUT15:GOTO4640
4590 GOSUB20000:?" THE BEAST RESITS IT ":PUT15:GOTO4640
4600 GOSUB20000:?" THE SPELL KILLS YOU ":PUT15
4610 GOTO55000
4620 DF=100:GOSUB36000
4630 GOTO2010
4640 DF=60:GOSUB36000
4650 GOTO4000
4660 DF=60:GOSUB36000
4670 GOTO3570
5000 C=C-5:IFC<=0THENSC=5:RETURN
5010 GOSUB20000:?" SLEEP FIEND ":PUT15
5030 DF=180:GOSUB36000
5040 GOSUB20000:?" IT STAGGERS ":PUT15
5050 DF=40:DL$="D":GOSUB36000
5060 IFRND<.5THEN5090
5070 GOSUB20000:?" AND COLLAPSES STUNNED ":PUT15
5080 EX=INT(EX+U/2):CF=0:SC=1:RETURN
5090 GOSUB20000:?" BUT RECOVERS SNARLING ":PUT15
5100 SC=2:RETURN
5200 IFMS>CORPS<49OREX<1000THENSC=4:RETURN
5210 C=C-1:IFC<=0THENSC=5:RETURN
5220 IFN=0THENGOSUB20000:?" IT HAS NO PSI TO HARM ":PUT15:SC=2:RET
URN
5230 GOSUB20000:?" MY MIND SMITES THEE ":PUT15
5240 DF=120:GOSUB36000
5250 RF=RND:IFRF<.4ANDN>10THENSC=6:RETURN
5260 D=INT((((CS*50*RF)-5*(MS+N)+E)/50)/4)
5270 IFD<=0THEND=0:SC=7:RETURN
5280 GOSUB20000:?" ":PUT15:GOSUB20000:?
IT CAUSES ";D*3;" DAMAGE ":PUT15
5290 N=N-3*D:IFMS<=0THENN=0
5300 MS=MS-D:IFMS<=0THENMS=0
5310 IF(MS+N)>0THENSC=2:RETURN
5320 GOSUB20000:?" KILLING THE BEAST ":PUT15
5330 EX=EX+U:CF=0:SC=1:RETURN
5400 IFPS<60OREX<5000THENSC=4:RETURN
5410 C=C-20:IFC<=0THENSC=5:RETURN
5420 GOSUB20000:?" FIRE OF HELL ON THEE ":PUT15
5450 DF=240:GOSUB36000
5460 GOSUB36000:PUT14,26:?" A FIREBALL FLIES AT IT ":PUT15
5470 DF=80:DL$="W":GOSUB36000
5480 IFRND>(PS/780)*(5-P1)THENGOSUB20000 :?" MISSED IT
":PUT15:SC=2:RETURN
5490 D=INT((CS+PS*RND)-(10*N*RND))
5500 IFD<=0THEND=0:SC=7:RETURN
5510 IFMS=0THENN=N-D:GOTO5530
5520 MS=MS-D:IFD>10THENN=INT(N-(D/3))
5530 GOSUB20000:?" ":PUT15:GOSUB20000:?"
IT CAUSES ";D;" DAMAGE ":PUT15
5540 IF(MS+N)<=0THEN5570
5550 DF=80:DL$="D":GOSUB36000
5560 SC=2:RETURN
5570 GOSUB20000:?" THE BEAST DIES SCREAMING ":PUT15
5580 EX=EX+U:CF=0:SC=1:RETURN
6000 PUT31,10,14:?" RATINGS ";:PUT15,12,10,10,10
6003 PRINT"1 MONSTER FOOD"
6005 PRINT"2 PEASANT"
6010 PRINT"3 CADET"
6015 PRINT"4 CANNON FODDER"
6020 PRINT"5 PATH WALKER"
6025 PRINT"6 NOVICE ADVENTURER"
6030 PRINT"7 SURVIVOR"
6035 PRINT"8 ADVENTURER"
6040 PRINT"9 ASSASSIN"
6045 PRINT"10 APRENTICE HERO"
6050 PRINT"11 GIANT KILLER"
6055 PRINT"12 HERO"
6060 PRINT"13 MASTER OF THE SWORD"
6065 PRINT"14 CHAMPION"
6067 GOSUB 1600
6070 PUT31,10,10,10:PRINT"15 NECROMANCER"
6075 PRINT"16 LOREMASTER"
6080 PRINT"17 PALADIN"
6085 PRINT"18 SUPERHERO"
6090 PRINT"19 DRAGON SLAYER"
6095 PRINT"20 THE VALLEYS KNIGHT"
6100 PRINT"21 MASTER OF COMBAT"
6105 PRINT"22 DOMINATOR"
6110 PRINT"23 THE VALLEYS PRINCE"
6115 PRINT"24 GAURDIAN"
6120 PRINT"25 WAR LORD"
6125 PRINT"26 DEMON KILLER"
6130 PRINT"27 LORD OF THE VALLEY"
6135 PRINT"28 MASTER OF DESTINY"
6137 GOSUB1600
6200 RETURN
9000 IFB=230ANDRND>.3THENGOSUB2000:?" NO ENTRY THIS WAY! ":PUT
15:GOTO9110
9005 FOR I=2TO7
9010 P(I)=0
9030 N(I)=INT(5*RND)+4
9040 IFN(I)=5THEN9030
9050 NEXTI
9060 IFS=1THENMP=M
9070 P(2)=INT(13*RND)+1
9080 TF=TN:GOTO9130
9090 IFTN>TF+INT(6*RND)+1THEN9130
9100 GOSUB20000:?" THE WAY IS BARRED ":PUT15
9110 TN=TN-1:C=C-10:DF=100:DL$="W":GOSUB36000
9120 GOTO2030
9130 C=C-10
9140 IFB=234THENS=1:FL=1
9150 IFB=113ANDS=4THENS=1:FL=1
9160 IFB=113ANDS=5ORS=6THENS=S-3:FL=FL-4:M=MW
9170 IFB=173THENS=2:FL=2
9180 IFB=242THENS=3:FL=3
9190 IFB=242ORB=173THEND2=INT(14*RND)+10:R2=INT(6*RND)+8
9200 IFB=109THENS=4:FL=2
9210 IFB=254THENS=S+3:FL=FL+4:MW=M
9220 ONSGOSUB10000,12000,12010,14000,14010,14010
9230 DF=5:GOSUB36000
9240 GOTO2000
10000 PUT31
10001 F$="VAEGH":FL=1:S=1
10005 PUT23,72
10010 PUT31
10015 FORI=1TO40:PUT160:NEXTI:PUT13
10020 FORI=1TO15:PUT160:PUT9:PUT9:PUT9:PUT9:PUT9,8,160,13:NEXTI
10030 FORI=1TO40:PUT160:NEXTI:PUT13
10032 FORI=0TO1:PUT22,(X1(I)),(Y1(I)),242,242:NEXTI
10033 FORI=2TO3:PUT22,(X1(I)),(Y1(I)),173,173:NEXTI
10034 FORI=4TO5:PUT22,(X1(I)),(Y1(I)),226:NEXTI
10035 PUT22,(X1(6)),(Y1(6)),109
10036 YX=Y:PUT22,2,YX,107:U=1
10037 FORI=3TO39
10038 IFRND>.5THEN10065
10039 IFU=1THEN10052
10040 PUT22,I,YX,20:GET#0,A$:O=ASC(A$):IFO<>32THENPUT22,I,Y+1,108:U=0:Y=Y+1:GOTO
10099
10045 PUT22,I,YX,107:U=1:GOTO10099
10052 YX=(Y)-1:PUT22,I,YX,20:GET#0,A$:O=ASC(A$):IFO<>32THENPUT22,I,Y,108:U=0:GOT
O10099
10057 PUT22,I,YX,107:U=1:Y=Y-1:GOTO10099
10065 IFU=1THEN10087
10076 YX=(Y)+1:PUT22,I,YX,20:GET#0,A$:O=ASC(A$):IFO<>32THENPUT22,I,Y,107:U=1:GOT
O10099
10081 PUT22,I,YX,108:U=0:Y=Y+1:GOTO10099
10087 PUT22,I,YX,20:GET#0,A$:O=ASC(A$):IFO<>32THENPUT22,I,Y-1,107:U=1:Y=Y-1:GOTO
10099
10092 PUT22,I,YX,108:U=0:GOTO10099
10099 YX=Y:IFY>=16THENY=16
10100 IFY<=2THENY=2
10101 XY=Y
10105 NEXTI
10200 PUT22,X1(4),Y1(4):PUT6
10550 PUT12:FORI=1TO20:PUT10:NEXTI:PUT14:?"
":PUT15
10551 PUT15:DF=1:GOSUB36000:RETURN
12000 F$="AFL":PC=121:GOTO12030
12010 F$="FAEHL":PC=114
12030 PUT31
12040 FORI=1TO40:PUT234:NEXTI
12045 FORK=1TO15:PUT12:FORI=1TO(K):PUT10:NEXTI:PUT234:FORG=1TO5:PUT9:NEXTG:PUT8,
234:NEXTK
12049 FORG=1TO200
12050 PUT22,INT(38*RND)+2,INT(15*RND)+2,PC:NEXTG
12060 PUT12:FORPP=1TO16:PUT10:NEXTPP:FORI=1TO40:PUT234:NEXTI
12080 PUT22,D2,R2,189,189,189,189,189
12090 PUT11,8,8,8,8,189,254,32,189
12100 PUT11,8,8,8,8,8,189,189,32,32,189,189
12110 PUT11,8,8,8,8,8,189,189,189,189
12120 PUT11,8,8,189
12215 PUT12:FORI=1TO20:PUT10:NEXTI:PUT14:?"
":PUT15:D=5:GOSUB36000
12220 RETURN
14000 F$="CAGE":P=0:H=N(FL):PK=32:GOTO14020
14010 F$="CBE":P=0:H=N(FL):PK=32:P(FL)=P(2)
14020 PUT31
14040 FORI=1TO40:PUT160:NEXTI:PUT13
14045 FORI=1TO15:PUT160:PUT9:PUT9:PUT9:PUT9:PUT9,8,160,13:NEXTI
14047 PUT12:FORI=1TO16:PUT10:NEXTI:FORI=1TO40:PUT160:NEXTI:PUT12
14048 RESTORE
14049 PX=INT(((FL*2)+S)/2)-4
14050 FORI=0TO(PX):READPP:IFPP=100THENRESTORE
14051 NEXTI
14052 FORY=2TO11STEP9
14060 FORW=0TO33STEP7
14200 READX:IFX=100THENRESTORE:GOTO14200
14210 READZ:IFZ=100THENRESTORE:GOTO14210
14220 PUT22,(X+W),Y:FORG=1TOZ:PUT160,8,10:NEXTG:NEXTW:NEXTY
14300 FORPP=0TO10STEP5
14305 FORX=0TO34STEP6
14310 READY:IFY=100THENRESTORE:GOTO14310
14320 READZ:IFZ=100THENRESTORE:GOTO14320
14330 PUT22,X,(PP+Y):FORG=1TOZ:PUT160:NEXTG
14340 NEXTX:NEXTPP
14350 IFS=5ORS=6THEN14380
14360 IFFL/2=INT(FL/2)THENPUT22,2,16,124:GOTO14380
14370 PUT22,39,2,124
14380 IFFL=2ORS=5ORS=6THENPUT22,2,10,113
14390 PUT12:FORI=1TO20:PUT10:NEXTI:PUT14:?"
":PUT15
14400 IFS=5THEN14470
14410 IFS=6THEN14450
14420 GOSUB20000:?" THE TOWER FLOOR ";FL-1;" ":PUT15:GOTO14490
14450 GOSUB20000:?" VOUNIMS LAIR ":PUT15:GOTO14500
14470 GOSUB20000:?" NEGUIRS TEMPLE ":PUT15:GOTO14500
14490 P(FL+1)=P(FL)+P
14500 IFFL<4ORRND<0.3THENRETURN
14510 FORI=1TOINT(5*RND)+2
14520 PUT22,(INT(37*RND)+3),(INT(13*RND)+2),42:NEXTI
14530 RETURN
15000 GOSUB20000:?" A STAIRWAY UP OR DOWN ? ":PUT15
15010 TV=FL
15020 VG$="ud":GOSUB1500
15030 IFGC$="u"THENFL=FL+1:GOTO15050
15040 FL=FL-1
15050 IFFL>7ORFL<2THEN15080
15060 DF=110:DL$="D":GOSUB36000
15070 GOTO9220
15080 GOSUB20000:?" THE STAIRS ARE BLOCKED ":PUT15
15090 DF=60:DL$="D":GOSUB36000
15100 FL=TV:GOTO15000
20000 PUT12:FORI=1TO18:PUT10:NEXTI:PUT14,26:RETURN
36000 FORDL=1TO(DF*ZX)
36010 NEXTDL
36020 IFDL$="D"THENDL$="":RETURN
36025 IFCF=0THENGOSUB20000:PUT11:?" ":PUT15
36030 GOSUB20000:PUT10:?" ":PUT15
36050 IFDF$="W"THENRETURN
36070 IFCS>77-INT(2*P1^2.5)THENCS=77-INT(2*P1^2.5)
36080 IFPS<7THENPS=7
36090 IFPS>INT(42*(P1+1)^LOG(P1^3.7))+75THENPS=INT(42*(P1+1)^LOG(P1^3.7))+75
36100 IFC>125-(INT(P1)*12.5)THENC=125-INT(INT(P1)*12.5)
36110 PUT12:FORI=1TO20:PUT10:NEXTI:PUT14:?" ";J$;TAB(20);P$:PUT15
36120 ?" TRS = ";TS;TAB(20);"C.S. = ";CS
36140 ?" EXP = ";EX;TAB(20);"PSI = ";PS
36150 ?" TNS = ";TN;TAB(20);"STM = ";C:PUT12
36180 IFCF=1THEN36210
36200 RETURN
36210 PUT12:FORI=1TO17:PUT10:NEXTI:PUT14,26:?M$;TAB(20);"M STR = ";MS:PUT15
36230 RETURN
45000 DF=5:DL$="W":GOSUB36000
45010 RT=INT(0.067*(EX+TS/3)^.5+LOG(EX/((TN+1)^1.5))):IFRT>28THENRT=28
45020 IFRT<0THENRT=0
45030 GOSUB20000:?" YOUR RATING NOW BE ";RT;" ":PUT15:DF=50:DL$="D":
GOSUB36000
45040 IFT(2)=1THENGOSUB20000:?" YOU HAVE EVANNAS HELM ":PUT15:DF=5
0:DL$="W":GOSUB36000
45050 IFT(0)=1THENGOSUB20000:?" AMULET STONES.....";T(1);" ":PUT15
45060 DF=250:DL$="W":GOSUB36000
45070 IFGC$="e"THENC=C-10:GC$="":GOTO2010
45080 RETURN
48000 GOSUB20000:?" THOU ART SAFE HERE ":PUT15:IFCS<20THENCS=20
48010 DF=150:GOSUB36000
48020 GOSUB20000:?" WILT THOU LEAVE HERE (Y/N)? ":PUT15
48030 VG$="yn":GOSUB1500
48040 DF=5:DL$="W":GOSUB36000
48050 GOSUB45000
48060 DF=110:DL$="W":GOSUB36000
48070 IFGC$="y"THEN49990
48090 GOSUB20000:?" THY WOUNDS HEALED GO WITH THE GODS ":PUT15
48100 DF=120:GOSUB36000
48110 GOTO2010
49990 GOSUB6000
50000 GOSUB20000:?" DO YOU WISH TO SAVE ";J$:PUT15
50010 GOSUB36000
50020 VG$="yn":GOSUB1500
50030 IFGC$="n"THEN50200
50040 GOSUB20000:?" INSERT CASSETTE PRESS PLAY & RECORD ":PUT15
50060 GOSUB1600
50070 OPENOUT#100,1,J$
50080 ?#100,P$
50090 ?#100,TS
50100 ?#100,EX
50110 ?#100,TN
50120 ?#100,CS
50130 ?#100,PS
50140 ?#100,T(0)
50150 ?#100,T(1)
50160 ?#100,T(2)
50170 ?#100,C1
50180 ?#100,P1
50190 CLOSE#100
50200 GOSUB20000:?" DONE TYPE RUN TO RESTART ":PUT15
50220 CLEAR
50230 END
55000 C=0:CS=0:PS=0:CF=0
55010 DF=110:GOSUB36000
55020 IFT(1)=6THEN55060
55030 GOSUB20000:?" WHAT A FRAIL SHELL. IS THIS A MAN!! ":PUT15
55050 FORI=1TO4000:NEXTI:GOSUB45000:GOSUB1600:GOSUB6000:GOSUB56000
55052 PUT31:GOTO50200
55060 T(0)=0:T(1)=0:T(2)=0:TS=0:CS=30:C=150:PS=30
55070 PUT31,10,10,10,10,10:?" THE AMULET PROTECTS THEE LIVE AGAIN "
55100 DF=150:GOSUB36000
55110 L=G(0):MP=L:M=W:S=1:GOTO9220
56000 PUT31,10,10:?" IF YOU FEEL THE NEED TO BEG FOR ":?" GUIDANCE THEN PRE
SS (H)":?:?:?:?" IF NOT THEN PRESS (N) TO CONTINUE "
56010 VG$="nh":GOSUB1500
56020 IFGC$="n"THENRETURN
56030 PUT31,10,10,10:?" THE AMULET IS ONLY FOUND IN ":?:?" NEGUIRS T
EMPLE":?:?" IF YOU DONT FIND IT AT FIRST "
56040 ?:?" THEN RETURN LATER":GOSUB1600
56050 PUT31,10,10,10
56060 ?" ONCE YOU HAVE THE AMULET THEN GOTO":?:?" THE UPPER FLOORS OF THE TOW
ER":?:?" AND TRY TO REMAIN THERE UNTIL YOU ":?:?" HAVE 6 AMULET STONES"
56070 ?:?" THIS WILL GIVE THE CHANCE OF LIFE ":?:?" AFTER DEATH.":?:?" THE
GO ON TO FIND THE HELM IN THE":?:?" FOREST......."
56080 GOSUB1600:RETURN
57000 PUT31,10,10,10:?" TO OBTAIN YOUR RATING PRESS ";:PUT197:?:?" FOR YOUR
EGO":GOSUB1600:RETURN
58000 PUT31,10,10,10:?" SELECT A SPEED 1-5":?:?" 1 FOR EXPERTS 5 FOR BEGIN
NERS"
58010 GET#5,ZX$:IFZX$=""THEN58010
58012 ZX=ASC(ZX$)
58013 IFZX>53ORZX<49THENGOTO58010
58020 ZX=ZX-48:GOSUB1600:PUT13,14:?" PLEASE WAIT... ":PUT1
5:RETURN
59000 DATA4,2,4,2,6,4,4,2,6,4,6,4,4,2,4,2,6,4,6,4,4,2,4,2,6,4,4,2,4,2,4,2,6,4,4,
2,6,4,6,4,4,2,4,2,6,4,4,2,6,4,4,2,6,4,100
60000 DATAAWOLFEN,9,0,AHOBGOBLIN,9,0,AORC,9,0,EFIREIMP,7,3,GROCKTROLL,19,0,EHARP
Y,10,12,AOGRE,23,0,BSPECTRE,0,25,HCENTAUR,18,14,EFIREGIANT,26,20,VFIRELIZARD,50,
0,HMINATOUR,35,25,CWRAITH,0,30,FWYVERN,36,12,BDRAGON,50,20,CRINGWRAITH,0,45,ABAL
ROG,50,50,LWATERIMP,15,15,LKRAKEN,50,0

Colin Appleby
Posts: 93
Joined: Wed Mar 16, 2016 10:05 pm

Re: The Valley game by KAYDE Software for NewBrain computer

#6 Post by Colin Appleby » Sun Sep 25, 2016 3:09 am

Hello Jim

Find attached the Intro program listing for "The Valley". Forgot to attach it to my previous posting:

1 OPEN#0,0,"S25":CLOSE#5:OPEN#5,5:CLOSE#6:OPEN#6,6
2 PUT23,72
5 ZX=5
10 PUT31,10,10,10,10,10:?" THE VALLEY "
15 GOSUB1600
20 PUT31,14:?:?:?:?:?" DO YOU WANT INSTRUCTIONS ":?"
Y OR N ? ":PUT 15
25 GET#6,ZZ$:IFZZ$=""THEN25
30 IF ZZ$="y"THEN51
35 IF ZZ$<>"n"THEN25
36 GOTO100
51 PUT31,14:?:?:?:?:?:?:?" MOVEMENT AS PER CURSOR KEYS ":PUT15
59 GOSUB1600
60 PUT31,10,10,10,10,10:?" THE OBJECT OF THIS GAME IS TO REACH ":?" A RATING
OF 28":?:?" TO ACHIEVE THIS YOU MAY NEED THE ":?" AMULET COMPLETE WITH 6 S
TONES ":?:?" IF YOU SURVIVE LONG ENOUGH YOU WILL ":?" EVENTUALLY FIND
IT!!! "
63 GOSUB1600
65 PUT31,10,10,10:?" ";:PUT27,242:?" = FOREST "
66 PUT10,10:?" ";:PUT27,173:?" = SWAMP"
67 PUT10,10:?" ";:PUT27,109:?" = DARK TOWER"
68 PUT10,10:?" ";:PUT27,226:?" = SAFE CASTLE"
69 PUT10,10:?" ";:PUT27,108,107:?" = SAFE PATH"
70 PUT10,10:?" ";:PUT27,189:?" = LAKE"
74 GOSUB1600
75 PUT31,10,10,10:?"WHEN IN COMBAT YOU FIGHT BACK BY ":?"PRESSING EITHER: ":PUT1
0,10:?" ";:PUT200:?" FOR HEAD":?"OR":PUT10:?" ";:PUT194:?" FOR B
ODY":?"OR":PUT10:?" ";:PUT204:?" FOR LEGS":GOSUB1600
78 PUT31,10,10,10:?" IF YOU SELECT SPELLS YOU CAN PICK ":?:?" FROM SPELLS 1 T
O 3 ":?:?" YOU START WITH SPELL 1 BUT THE ":?:?" OTHER SPELLS MUST BE EARNED":
GOSUB1600
81 PUT31,10,10,10:?" IN THE FORREST AND SWAMP IS A LIKE ":?" IN THE CENTRE OF
THE LAKE IS A":?" BUILDING":PUT10,10:?" IN THE BUILDING YOU MAY FIND THIS":PUT
10,9,9,42:?:?:?" THIS IS A SPECIAL FIND AND WORTH":?" GETTING":GOSUB1600
88 PUT31,10,10,10:?" TRS = TREASURE":?:?" EXP = EXPERIENCE":?:?"
TNS = TURNS":?:?" C.S. = PSI POWER":?:?" STM = STAMINA":
GOSUB1600
100 PUT31,10,10,10,10:?" PLEASE PRESS CONTROL & 1 ":?:?" THIS INTRODUCTIO
N WILL NOW END ":?:?" TYPE LOAD FOR THE REMAINDER OF THE ":?:?" PROGRA
M ......"
110 GOSUB1600
120 CLEAR:NEW
1600 PUT12,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,14:?" *
* * PRESS ANY KEY * * * ";:PUT15
1610 GET#6,GC$:IF GC$=""ORASC(GC$)=0THEN1610
1620 RETURN

Colin Appleby
Posts: 93
Joined: Wed Mar 16, 2016 10:05 pm

Re: The Valley game by KAYDE Software for NewBrain computer

#7 Post by Colin Appleby » Wed Nov 02, 2016 12:25 am

To: Jim Gerrie

Well done converting the NewBrain version of "The Valley" game to TRS-80 MC-10.

I am still working on the TREK ADVENTURE. I am having problems setting up the ARRAY in line 0.

DIM C1,CC,M$

If C1 is 1 and CC is 32 what is M$

Regards

Colin

User avatar
jgerrie
Posts: 287
Joined: Sat Aug 17, 2013 1:25 pm
Location: Nova Scotia
Contact:

Re: The Valley game by KAYDE Software for NewBrain computer

#8 Post by jgerrie » Thu Nov 17, 2016 2:54 am

Colin,

0 CLS:CLEAR1000:DIMC1,CC,M$:GOTO5
1 C1=1:CC=32
2 IFMID$(M$,CC,1)<>""ANDMID$(M$,CC,1)<>" "THENCC=CC-1:GOTO2
3 PRINTMID$(M$,C1,CC-C1):C1=CC+1:CC=C1+31:IFC1<=LEN(M$)THEN2
4 RETURN

Lines 1-4 are my dandy all purpose word wrap routine. Just change the CC variable in line one to any number you want text to be wrapped to (40,80, whatever).

In MS Basic DIM can be used for other purposes than defining arrays. It can also be used to simply regular declare variables. Since variables are accessed in MS basic by a lookup list, those declared earliest operate faster than those declared later, so I like to get variables used often and that need speed declared in line zero. You can just leave that DIM statement out if Newbrain Basic can't use DIM in the same way.
Colin Appleby wrote:To: Jim Gerrie

Well done converting the NewBrain version of "The Valley" game to TRS-80 MC-10.

I am still working on the TREK ADVENTURE. I am having problems setting up the ARRAY in line 0.

DIM C1,CC,M$

If C1 is 1 and CC is 32 what is M$

Regards

Colin

Post Reply