Buckaroo Banzai

discuss classic text/graphic adventures for the bbc micro & electron
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Buckaroo Banzai

Post by lurkio »

tautology wrote: Thu Aug 27, 2020 12:01 am In terms of building a new game it's a bit of a pain, but easier than it once was.
Thanks for the instructions! I'll have a go at this shortly.

tautology wrote: Thu Aug 27, 2020 12:01 am Step 5, play and tweak
If needed (and yes I found a bug in the word wrap on playing it though. Bah).
Yes, here are the word-wrap errors I found at the start of the game The Count. (I haven't played very far into the game at all.):

Screenshot 2020-09-15 at 20.28.44.png
Screenshot 2020-09-15 at 20.28.27.png

:idea:
User avatar
tautology
Posts: 469
Joined: Wed Sep 01, 2010 3:26 pm
Contact:

Re: Buckaroo Banzai

Post by tautology »

So you can drop most of the word wrap by moving TEXTCOL to 39. There is a bug where the string starts with a CR character and it seems to do an LF instead, which I'm not certain why as it should pass it to OSASCI.

I may need yet another rewrite of the word wrap.

What I may do is just bite the bullet and port all the SA and MA adventure to this format and start a new thread to debug all of them.
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Buckaroo Banzai

Post by lurkio »

I've been working on Lee's ever-growing series of text adventure games, and I've had to become more familiar than I ever wanted to be with wordwrapping text in MODE7, using all forty columns, with a user-definable Teletext colour code at the start of every line (overrideable within the string you're trying to print).

Here's a PROC that uses a wordwrapping algorithm that might well work for the Scott Adams / Brian Howarth games too:

Run in JSBeeb

0913B978-1EDC-40A6-A3DC-928E4782CD03.jpeg

Code: Select all

NEW
AUTO

MODE7
DIM S% 255
PRINT
PROCp(131,"Hello there, all you guys and gals. ")
PROCp(131,"This is Eddie, your shipboard computer, welcoming you aboard the starship Heart of Gold...")
PRINT'
PROCp(133,"Oh, shut up, Eddie! ")
PRINT'
PROCp(131,"How rude!")
PRINT'
PROCp(130,"Get us out of here, Eddie! Just do it"+CHR$129+"now!"+CHR$130)
PROCp(130,"We're under attack! They're launching missiles at us!")
PRINT'
PROCp(131,"I can't! All my circuits are irrevocably")
PROCp(131," committed to calculating how to make the"+CHR$133+"perfect"+CHR$131+"cup of tea!")
PRINT'
PROCp(134,"Terrific!")
PRINT'
PROCp(135,"This is it, isn't it? We're definitely going to die!")
PRINT'
END

REM MODE7 colour wordwrap procedure
REM $S% is the string that will be broken into substrings of up to 39 chars and thus wordwrapped.
REM (The fortieth char is the Teletext colour code at the start of each line.)
REM V% is the Teletext colour code to print at the start of every line (unless overridden in $S%).
REM M% is the number of columns of text in MODE7 (i.e. forty).
REM N% is the length of the string $S%.
REM A% points to the start position of the current substring within $S%.
REM Z% points to the end position of the current substring within $S%.
REM C% stores ASCII code 32 (space) or any Teletext colour code from 129 to 135, if found in $S% while searching for the next viable line-break point.
REM (When the final substring is printed, C% stores the string terminator &D.)
REM K% caches the value of C%.
DEFPROCp(V%,$S%):LOCAL M%,N%,A%,Z%,C%,K%:M%=40:N%=LEN$S%:A%=0:Z%=M%-POS
 REPEAT:REM Find next printable substring by working backwards from end of next 39-char section, looking for a line-break point
  IF Z%>N% Z%=N%:C%=&D ELSE REPEAT Z%=Z%-1:C%=S%?Z%:UNTIL C%=32 OR C%>128ANDC%<136 OR Z%<A%:IF Z%>=A% ELSE IF POS PRINT:Z%=M%:UNTIL0 ELSE STOP:error
  IF POS ELSEIF A%=0 OR K%=32 VDUV% ELSE VDUK%:REM Print Teletext colour code if at start of line
  S%?Z%=&D:PRINT$(S%+A%);:S%?Z%=C%:REM Print current substring
  IF Z%<N% IF POS PRINT:REM Break line if not at end of $S% and cursor isn't at start of line
  A%=Z%+1:Z%=A%+M%:K%=C%:REM Update substring pointers, and cache the line-break char
 UNTIL A%>=N%
ENDPROC

:idea:
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Buckaroo Banzai

Post by lurkio »

tautology wrote: Thu Aug 27, 2020 12:01 am Step 1, prepare the data file. As the original datafile is 18 KB; there's no way we could run this as is on a Beeb, so you need to compress it.
It's true that the many, many numbers which make up the Actions (which are stored in the original .DAT file as plain text) need to be converted to Beeb integers or reals — but, surprisingly, the English-language text data doesn't necessarily need to be compressed:

https://github.com/ahope1/BeebScott/tre ... he%20Count

See also BeebScott on Stardot:

viewtopic.php?f=65&t=24241

:idea:
User avatar
tautology
Posts: 469
Joined: Wed Sep 01, 2010 3:26 pm
Contact:

Re: Buckaroo Banzai

Post by tautology »

I was working from the original, original pure text files. Both the Howarth and Jukic engines converted these to integers. I went further as I wanted to make space for graphics as well.
Post Reply

Return to “8-bit acorn software: classic adventure games”