Page 1 of 2

Posted: Sat Jul 07, 2018 12:12 pm
Hello, this is from a type-in listings book The Rainbow Book of Adventures. The blurb reads:

"Like everyone else, you've listened to the rumours about the old smugglers hideout
somewhere on the peninsula but, unlike everyone else, you're going to find it!

All you have to do is find the gold......
"

I am stuck in the first 6 or so rooms (The peninsula and the lighthouse itself) I can't figure out how to progress after Examine Generator, Examine Hole, etc etc... I have checked the listing but it could still be a bug I introduced when I typed it in from the book.

Posted: Sat Jul 07, 2018 2:10 pm
b_b_c_m_i_c_r_o_2 wrote:
Sat Jul 07, 2018 12:12 pm
I am stuck in the first 6 or so rooms (The peninsula and the lighthouse itself) I can't figure out how to progress after Examine Generator, Examine Hole, etc etc... I have checked the listing but it could still be a bug I introduced when I typed it in from the book.
There's a typo on line 119 (zero for capital O). Here's what I think is the corrected version:

Code: Select all

``119IFOB=6THENPRINT"A secret panel slides open.":D(8,1)=16:GOTO31``
Also, if you run the game and press Escape at the first input prompt and then enter the following line of code at the BASIC prompt, you'll see that rooms 1 to 6 are isolated from the rest of the map:

Code: Select all

``@%=3:F.Y=1TO21:F.X=1TO6:IFD(Y,X)P.Y,D(Y,X);" ";D\$(X):N.,EL.N.,``
There doesn't seem to be any way to get to room 7:

Code: Select all

``````>@%=3:F.Y=1TO21:F.X=1TO6:IFD(Y,X)P.Y,D(Y,X);" ";D\$(X):N.,EL.N.,
1  3 north
1  2 south
1  2 east
1  2 west
2  2 north
2  2 south
2  2 east
2  1 west
3  1 south
3  4 up
3  6 down
4  5 up
4  3 down
5  4 down
6  3 up
7  9 south
7 12 east
7  8 west
8  7 east
9  7 north
10  9 north
10 11 east
11 10 west
12  7 west
13 11 south
14 15 north
15 14 south
15 16 west
16  8 south
16 15 east
17 16 south
18 17 east
18 19 west
19 18 east
20 19 east
20 21 west
21 20 east
>``````

Posted: Sat Jul 07, 2018 5:57 pm
b_b_c_m_i_c_r_o_2 wrote:
Sat Jul 07, 2018 12:12 pm
I am stuck in the first 6 or so rooms (The peninsula and the lighthouse itself) I can't figure out how to progress after Examine Generator, Examine Hole, etc etc... I have checked the listing but it could still be a bug I introduced when I typed it in from the book.
There was also a typo on line 103. Here's the corrected version:

Code: Select all

``103IFOB=32ANDO(33)=0THENPRINT"I see something!":O(33)=L:GOTO31``
Now you can get to room 7 from the generator room (room 6) -- but what you have to do (i.e. what the original programmer intended) is type EXAMINE GENERATOR twice!

Typos corrected. N.B. This is a DEBUG VERSION of the program (room numbers are printed on screen).

Btw, for anyone who's curious, here's the book:

Posted: Sun Jul 08, 2018 9:04 am
Me and my typing ! That explains why I was so perplexed!

There were in fact a number of errors in the listing in the book. There appeared to be something off with ELSE statements, so I rewrote the two in question so it was clear what was intended.

Also I discovered you can GET FLINT from the ROCK.

Posted: Sun Jul 08, 2018 4:54 pm
b_b_c_m_i_c_r_o_2 wrote:
Sun Jul 08, 2018 9:04 am
There were in fact a number of errors in the listing in the book. There appeared to be something off with ELSE statements, so I rewrote the two in question so it was clear what was intended.
I found one ELSE that you rewrote, but not the other.

The one I found was on line 124. Here's line 124 from the original book:

Code: Select all

``124IFOB=39THENPRINT"The platform starts to rise.":IFT=1THEN125 ELSE31``
The author probably intended the ELSE to be tied only to the IFT=1 (and not to the earlier IFOB=39) but that isn't possible in BBC BASIC because the failure of the first test (IFOB=39) will result in flow-control falling through to the ELSE at the end! So, in BBC BASIC, if OB isn't equal to 39 then control will jump straight to line 31, no matter what the value of OB actually is! (Whereas the original author probably intended control to jump to line 31 only if OB was equal to 39 (and T wasn't equal to 1). Which might well work on the TRS-80/CoCo, but won't on the Beeb.) This gotcha in BBC BASIC has tripped me up countless times!

You've rewritten line 124 as follows:

Code: Select all

``124IFOB=39THENPRINT"The platform starts to rise.":IFT=1THEN125 ELSE IFOB=39THENGOTO31``
Here's another way to do it (but not necessarily a better way!):

Code: Select all

``124IFOB=39THENPRINT"The platform starts to rise.":GOTO-(T=1)*125-(T<>1)*31``
And here's yet another way, which won't screw up a RENUMBERing and still keeps everything on one line:

Code: Select all

``124REPEAT IFOB<>39 UNTIL1 ELSE PRINT"The platform starts to rise.":IFT=1 UNTIL1:GOTO125 ELSE UNTIL1:GOTO31``

EDIT: I've only just realised that that last line of code can be improved by using an IF..THEN..ELSE statement with an "empty" THEN, as follows:

Code: Select all

``124 IF OB<>39 THEN ELSE PRINT"The platform starts to rise.":IF T=1 GOTO125 ELSE GOTO31``

Posted: Sun Jul 08, 2018 6:31 pm
Afternoon,

I found the other errors I had introduced with my typing:

Have needed to change from this:

Code: Select all

``````10L=1:IN=0:C=0:F=0:T=0
109IFOB=2OROB=8OROB=9OROB=16THEN110 ELSE PRINT"How can I read that?":GOTO31
117IFOB=4THENPRINT"Nothing seemed to happen.":IFR=0THEND(7,5)=0:O(38)=0:R=1:GOTO31
118IFOB=4THEND(7,5)=6:O(38)=7:R=0:GOTO31
173UFF=0ANDFT=1THENPRINT"You shot down the door.":F=1:D(16,1)=17:O(27)=0:GOTO31
188IFLEFT\$(P\$,3)="TRO"THENPRINT"OK.":O(250=-1:D(6,5)=0:GOTO31``````
To this:

Code: Select all

``````10L=1:IN=0:C=0:F=0:T=0:R%=0
109IFOB=2OROB=8OROB=9OROB=16OROB=20THEN110 ELSE PRINT"How can I read that?":GOTO31
117IFOB=4THENPRINT"Nothing seemed to happen.":IFR%=0THEND(7,5)=0:O(38)=0:R%=1:GOTO31
118IFOB=4THEND(7,5)=6:O(38)=7:R%=0:GOTO31
173IFF=0ANDFT=1THENPRINT"You shot down the door.":F=1:D(16,1)=17:O(27)=0:GOTO31
188IFLEFT\$(P\$,3)="TRO"THENPRINT"OK.":O(25)=-1:D(6,5)=0:GOTO31``````

Posted: Sun Jul 08, 2018 6:34 pm
Evening,

Here are some clues:

Don't drink from the bottle.
The gun only needs to be used once.
You can't cut anything.
Who is Marple?
The treasure chest is too heavy to "GET".
Examine the fireplace twice.

The "SEARCH" command is a bit confusing. In all cases except one "SEARCH" and "EXAMINE" are interchangable. Maybe better to just have the one "EXAMINE" command.

I am stuck trying to sort out the treasure chest. I don't know what the "TRO" in line 188 is and why I need to shoot it.

Here is the version with the corrections to the errors described in my post previous to this one:
Update to Lurkio's debug version (with room numbers as so useful)

Posted: Sun Jul 08, 2018 11:47 pm
b_b_c_m_i_c_r_o_2 wrote: Here is the version with the corrections to the errors described in my post previous to this one

Weird thing for a guard to say:

Here are the corrected versions of some of the lines of code:

Code: Select all

`````` 10L=1:IN=0:C=0:F=0:T=0:R%=0:FT=0:G=0
13DATAIn a large dining hall,In the guard room,In the chart room,In the captains room,In the store room,In a metal storage cabinet,In an enormous vaulted chamber
94IFOB=17THENPRINT"There's a liquid in it.":O\$(17)="BOTTLE WITH LIQUID":GOTO31
133IFOB=21THENPRINT"I see some bullets.":O(24)=L:GOTO31
140IFO(41)<>-1 THENPRINT"I don't have anything to light it with.":GOTO31
145PRINT"It fits well.":G=1:GOTO31
181IFOB=4OROB=39 THENPRINT"It seems to be a very strong rope. I can't cut it.":GOTO31
193IFL=18 OR L=19 OR L=20 THEN194 ELSE PRINT"It sounds beautiful.":GOTO31
198IFL=17THENL=18:O(30)=19:GOTO27
201IFOB=3THENPRINT"How murderous. Unfortunately it did no  good.":GOTO31
205IFOB=42THENPRINT"He smiles and says, ""Good to see you"'"again, Cap'n."" ... and dissapears!":O(3)=0:D(9,2)=10:GOTO31
``````
Line 10 now declares the variables FT and G and initialises them to zero.
Line 201 just has an extra space before "good" to correct the word-wrapping.

Here are the corrected versions of some typos that were in the original listing in the book:

Code: Select all

`````` 83IFOB=3THENPRINT"Looks like a tough guy. He says ""What'sthe password?>""":GOTO31
84IFOB=4THENPRINT"It looks like a bell-pull.":GOTO31
92IFOB=15THENPRINT"It looks like an antique.":GOTO31
97IFOB=25THENPRINT"It looks very utilitarian.":GOTO31
98IFOB=26THENPRINT"It looks like a good one.":GOTO31
101IFOB=30THENPRINT"It looks terribly ferocious!":GOTO31
``````

Posted: Mon Jul 09, 2018 1:58 pm
b_b_c_m_i_c_r_o_2 wrote:
Sat Jul 07, 2018 12:12 pm
Hello, this is from a type-in listings book The Rainbow Book of Adventures.
Have you typed in -- or are you planning to type in -- any of the other listings from that book?

I've found the disk-image with the listings already typed in and I've worked out how to export the listings to a text file via a (rather old) TRS-80/CoCo emulator. Let me know if you want a particular listing. I've only exported One Room so far.

EDIT: Get the disk-image for The Rainbow Book Of Adventures here (you'll have to extract it from the zip archive):
Then upload the disk-image to the online CoCo emulator here (click "Local File"):
Type DIR. Then type LOAD "filename". Then RUN to run the game, or LLIST to send the listing to the printer, which, in this case, is the Javascript console of your web-browser.

Posted: Mon Jul 09, 2018 7:22 pm
b_b_c_m_i_c_r_o_2 wrote:
Sun Jul 08, 2018 6:34 pm
I am stuck trying to sort out the treasure chest. I don't know what the "TRO" in line 188 is and why I need to shoot it.

You don't!

Here's my latest version of the listing, incorporating the changes from my earlier post, above:

Posted: Tue Jul 10, 2018 11:49 am
Hi Lurkio, thanks for all this - lots of typos from me in there. O vs 0 and 0OR errors !!! Have you got the ssd of the latest version?

Also have you got a small clue about how how I begin to move the treasure chest?

Posted: Tue Jul 10, 2018 12:39 pm
b_b_c_m_i_c_r_o_2 wrote:
Tue Jul 10, 2018 11:49 am
lots of typos from me in there. O vs 0 and 0OR errors !!! Have you got the ssd of the latest version?
I'll post a .SSD once I've checked there aren't any more typos. Meanwhile, you can just take the listing attached to my previous post, and copy and paste it into BeebEm.

b_b_c_m_i_c_r_o_2 wrote:
Tue Jul 10, 2018 11:49 am
Also have you got a small clue about how how I begin to move the treasure chest?
Just roll with it.

Posted: Tue Jul 10, 2018 6:44 pm
Cleaned the text up a bit more.

Play online:

Here's the latest .SSD:
Listing:

Posted: Thu Jul 12, 2018 12:35 pm
Fantastic! --- I didn't quite manage to solve it yesterday.

Posted: Thu Jul 12, 2018 1:43 pm
lurkio wrote:
Mon Jul 09, 2018 1:58 pm

Have you typed in -- or are you planning to type in -- any of the other listings from that book?

I've found the disk-image with the listings already typed in and I've worked out how to export the listings to a text file via a (rather old) TRS-80/CoCo emulator. Let me know if you want a particular listing. I've only exported One Room so far.
I haven't typed any other in so far. Of the others, the two that interested me were "Escape from Sparta" and "The Door"

If we have the listing as a text file is it not possible to put the text file onto an .ssd and then to *SPOOL the listing from that disk into the BBC?

Posted: Thu Jul 12, 2018 4:47 pm
b_b_c_m_i_c_r_o_2 wrote:
Thu Jul 12, 2018 1:43 pm
I haven't typed any other in so far. Of the others, the two that interested me were "Escape from Sparta" and "The Door"
Ah. The one that caught my eye was One Room! I'm just finishing up the Beeb port now.

b_b_c_m_i_c_r_o_2 wrote:
Thu Jul 12, 2018 1:43 pm
If we have the listing as a text file is it not possible to put the text file onto an .ssd and then to *SPOOL the listing from that disk into the BBC?
Yes, of course. Or you can simply copy and paste the listing into BeebEm. Once I've exported the listing from a CoCo emulator, I tend to edit the listing in a modern text editor, and then copy and paste the whole listing into BeebEm whenever I want to test my edits.

Posted: Thu Jul 12, 2018 5:49 pm
b_b_c_m_i_c_r_o_2 wrote:
Thu Jul 12, 2018 1:43 pm
I haven't typed any other in so far.

Okay, here's One Room by Jorge Mir, a room-escape text adventure game from the same book as Lighthouse Adventure (above): The Rainbow Book Of Adventures. You'll need some distinctly American vocab in places. (N.B. The original listing was quite buggy, and some bugs still remain, but the game is winnable.)

Listings:
• Full(ish) changelog for oneroom.bas, on Github. The ordering of early checkins is a bit iffy. Checkin dates are inaccurate.

Walkthrough, which you can copy and paste into BeebEm:

EDIT: Here's a writeup of the original TRS-80/CoCo version: http://gamingafter40.blogspot.com/2014/ ... nture.html

EDIT 2: Updated program to try to correct LOAD/SAVE routines. Uploaded new .SSD and new listing.

EDIT 3: Minor bugfix (re the printing of messages after a certain avian event). I don't think I'm gonna fix any more bugs because there are too many of them!

EDIT 4: Except for that bug on line 85 that I myself introduced, which I've just fixed in beta7.

EDIT 5: Bugfix for LOAD/SAVE. Aaargh. See beta8.

EDIT 6: Evidently I lied about not fixing any more bugs. Bugfixes for various bird/cage/seed/exit/entry problems; and for floorboard/box/hole problems; and for CB appearance/gettability problems; and to implement PUSH SWITCH as a synonym for TURN SWITCH: see beta12, in this post (above).

EDIT 7: Another bugfix for LOAD/SAVE. Grrr.

EDIT 8: Added titles and instructions to disc-image. Corrected size of flags array F%(). See beta14.

EDIT 9: Removed some redundant code. Changed ending so game restarts on win. See beta15.

EDIT 10: Minor. beta16.

EDIT 11: Fixed bug where direction commands (N, S, etc.) could be used, even before blindfold had been removed! See beta17.

EDIT 12: Corrected typo. Improved SAVE error-handling. See beta18.

EDIT 13: Corrected line 186. The contrived REPEAT construction. Needs replacing passim, really.

EDIT 14: Removed contrived REPEAT..UNTIL1 construction; replaced with "empty THEN" as in IF c THEN ELSE a.

EDIT 15: Removed leading and trailing spaces from input. Added X for EXAM. Added I for INV. Added L for LOOK. Trapped HELP {word}. Prevented LOOK/EXAM {direction} from working when blindfolded!

EDIT 16: Expanded entire listing -- no more abbreviated BASIC keywords! Had to change line 192 to fit into 256 chars and incidentally compacted its IF/ELSE logic. See beta22.

EDIT 17: Improved the trimming of extraneous spaces from user-input. See beta23.

Posted: Sat Aug 25, 2018 1:48 pm
lurkio wrote:
Mon Jul 09, 2018 7:22 pm
b_b_c_m_i_c_r_o_2 wrote:
Sun Jul 08, 2018 6:34 pm
I am stuck trying to sort out the treasure chest. I don't know what the "TRO" in line 188 is and why I need to shoot it.

You don't!

1.png

Here's my latest version of the listing, incorporating the changes from my earlier post, above:
Yes I have completed it now..... a couple of comments:

I wonder if PUT and LOAD caused a bit of confusion to potential players as one could imagine trying "LOAD CHEST" instead of "PUT CHEST"

There was one thing that is peculiar - I got stuck underneath the lighthouse after dropping the treasure chest off the top of the lighthouse:- Although I had PUT the CHEST in the HOLE, when I went down to the generator room the "UP" exit was not available. This is because when you PUT CHEST -> TROLLEY, then DROP CHEST the line 78 should be:

78IFOB=25 AND L=5 THEN PRINT"The chest crashes down to the rocks below and smashes open!":O(25)=1:O(40)=1:D(6,5)=3:GOTO31

(because when you load the chest onto the trolley in line 188 it disables the up exit from the generator room)

Posted: Sat Aug 25, 2018 6:50 pm
Thinking it through this is the change that is required to cover the case where the chest is dropped somewhere other than onto the rocks:

78IFOB=25 THEN D(6,5)=3:IF L=5 THEN PRINT"The chest crashes down to the rocks below and smashes open!":O(25)=1:O(40)=1:GOTO31

Posted: Sun Aug 26, 2018 11:31 am
Having enjoyed reading all of this I got to searching and found a pdf copy of the Second Book of Rainbow Adventures, but sadly not the third or fourth. Not sure how to attach the 2nd book pdf to this post though?

I got the disk images for all 4 volumes but can't load some of the adventures into the CoCo Emulator where the filesize is over 10kb getting an ?OM error (Out of Memory). Is there some trick to persuade CoCo to release some memory? Otherwise it means a lot of typing and debugging..

Posted: Sun Aug 26, 2018 11:40 am
b_b_c_m_i_c_r_o_2 wrote:
Sat Aug 25, 2018 6:50 pm
Thinking it through this is the change that is required to cover the case where the chest is dropped somewhere other than onto the rocks:

78IFOB=25 THEN D(6,5)=3:IF L=5 THEN PRINT"The chest crashes down to the rocks below and smashes open!":O(25)=1:O(40)=1:GOTO31
Hi,
Is it possible to update the SSD in the first post with all the fixes.
It saves me getting it wrong
If it is definitely completeable I will upload it to bbcmicro.co.uk as soon as possible...
Oh! and thanks for playing this through

Lee.

Posted: Sun Aug 26, 2018 11:43 am
leenew wrote:
Sun Aug 26, 2018 11:40 am
Is it possible to update the SSD in the first post with all the fixes. It saves me getting it wrong If it is definitely completeable I will upload it to bbcmicro.co.uk as soon as possible...
Am working on it.

Posted: Sun Aug 26, 2018 12:36 pm
Ta Lurkio.

Lee.

Posted: Sun Aug 26, 2018 2:59 pm
b_b_c_m_i_c_r_o_2 wrote:
Sat Aug 25, 2018 6:50 pm
Thinking it through this is the change that is required to cover the case where the chest is dropped somewhere other than onto the rocks:

Code: Select all

``78 IFOB=25 THEN D(6,5)=3:IF L=5 THEN PRINT"The chest crashes down to the rocks below and smashes open!":O(25)=1:O(40)=1:GOTO31``
Thanks. I've incorporated the change into the .SSD disc-image.

You can play it online here:
Here's the amended listing:
And here's the solution/walkthrough:
• script.txt

EDIT: Bugfixed the listing and the disc-image

Posted: Sun Aug 26, 2018 3:21 pm
RonBate wrote:
Sun Aug 26, 2018 11:31 am
Having enjoyed reading all of this I got to searching and found a pdf copy of the Second Book of Rainbow Adventures, but sadly not the third or fourth. Not sure how to attach the 2nd book pdf to this post though?
See the "Attachments" tab below the edit-window when you're composing a post. The filesize might be too big though. Can't remember exactly what the limit is on Stardot.

The Second Rainbow Book of Adventures is available online here:
And the third is here:

RonBate wrote:
Sun Aug 26, 2018 11:31 am
I got the disk images for all 4 volumes but can't load some of the adventures into the CoCo Emulator where the filesize is over 10kb getting an ?OM error (Out of Memory). Is there some trick to persuade CoCo to release some memory? Otherwise it means a lot of typing and debugging..
Dunno! I'm not very good with the TRS-80 (any of them).

Posted: Sun Aug 26, 2018 10:20 pm
lurkio wrote:
Sun Aug 26, 2018 3:21 pm
RonBate wrote:
Sun Aug 26, 2018 11:31 am
I got the disk images for all 4 volumes but can't load some of the adventures into the CoCo Emulator where the filesize is over 10kb getting an ?OM error (Out of Memory). Is there some trick to persuade CoCo to release some memory? Otherwise it means a lot of typing and debugging..
Dunno! I'm not very good with the TRS-80 (any of them).

Did some research. Try typing the following command before you load the big program:

Code: Select all

``PCLEAR 1``
Thanks to:

Posted: Mon Aug 27, 2018 8:43 pm
Thanks lurkio, the CoCo memory tip works a treat. Also thanks for tracking down the Third Rainbow book - I managed to track down a website that claimed to have the fourth book available to download for free all I had to do was register and enter my credit card details (they promised not to debit any charges!!!) Not going to risk it so will keep looking. Some of the programs on the disks listings have errors/bits missing so the printed listings help.

I have converted a few of the adventures to BB4W from which I can move them to BeebEm for final testing and create an SSD. I'm not very good with music so I am chopping out all the sound effects unless someone is able to help? Also there are graphics in some of the originals which will be removed.

Posted: Thu Aug 30, 2018 6:50 pm
RonBate wrote:
Mon Aug 27, 2018 8:43 pm
Thanks lurkio, the CoCo memory tip works a treat. Also thanks for tracking down the Third Rainbow book
You're welcome!
RonBate wrote:
Mon Aug 27, 2018 8:43 pm
I'm not very good with music so I am chopping out all the sound effects unless someone is able to help?
Maybe leave placeholders for the sound code in the listing, and then someone might pitch in (pun unintended) with some SOUND/ENVELOPE commands -- probably not me though because I have a very poor understanding of sound and music on the Beeb!
RonBate wrote:
Mon Aug 27, 2018 8:43 pm
Also there are graphics in some of the originals which will be removed.
I understand graphics even less!