Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CMM2: Scott Adams Adventure Game Interpreter
Page 4 of 5 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Maybe I'll take a look if/when we have permission from Scott to distribute. If it is *really of interest* to you then I can try and create an executable for you. The code is Ruby and I *believe* standalone executables can be generated from that ... though that might just mean that the Ruby virtual machine is package wholesale with it. Let me know if you want me to try. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Thanks again Tom, and how do you describe 'nowhere'? Command 80 is used a few times in adv06 and often a DspRM occurs later in the same line so I am comfortable to leave it out. Regarding adv14b, I may have a look at it but I suspect that the data probably needs a bit of massaging. I suspect that it exploited the early versions of BASIC ability to happily accept early exits from FOR loops, subroutines and so on. On Scottkit, thanks for the offer but as I am apparently the only one interested and it would be a steep learning curve to achieve little. I wouldn't bother. I'll try johngill's ZILish when I get the time and try to come to grips with that. Merry Christmas Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hello again Tom, I promise I have not been smoking anything but, what do you understand from command 75 (the last one!) 75: BYx<-x Put the Par #2 object in the same place as the Par #1 object. If the Par #2 object is being carried, this will pick up the Par #1 object too, regardless of the carry limit. If this changes the objects in the current room, the room will be displayed again. It seems to me that he has the Par #1 and Par #2 mixed up in (perhaps) the second sentence? Does he mean: "If the Par #1 object is being carried, this will pick up the Par #2 object too" Or maybe I'm just getting too old for this and am too easily confused. Merry Christmas Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, Fair point, well made . OK. Perhaps, but my understanding is that long before adv14b Scott had moved away from his original BASIC interpreter. I have checked the Scottfree interpreter and it simply moves the Par#1 object to the same room as the Par#2 object. So it looks like it may be the first sentence that is wrong. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hi Tom, Yes, while watching TV, I was wondering if I had it backwards. You might expect it was the Par #1 object to be acted on. I'll implement it that way and see what happens. It should also GET the Par #2 object if you are carrying the Par #1 object, shouldn't it? The Github Scottkit site suggests that 14b was not written by Scott Adams but I don't know. Merry Christmas Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, GET just means move the object to room -1, and DROP just means move it from room -1. So you don't need any special handling. i.e. if the Par#2 object is already being carried (room -1) then CMD 75 will move the Par#1 object to room -1, the same as GETting it. What you do need to decide is whether to redescribe the current location if the Par#1 object is being moved to or from the current room 'r'. Scottfree sets its 'redraw' flag in this case as I described a few posts back. Best wishes, Tom Edited 2020-12-24 09:05 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hello again Tom, I think I had that sussed. This is what I have done (plus debug print) ' - Bill - not sure if this command should display the room ' Put the Par #1 object in the same place as the Par #2 object. ' If the Par #2 object is being carried, this will pick up the ' Par #1 object too, regardless of the carry limit. ' If this changes the objects in the current room, the room will be displayed again. x = get_parameter(a) ' x = object 1 y = get_parameter(a) ' y = object 2 ' p = (x = r) or (y = r) ' was either in the current room? ia(x) = ia(y) ' IF p then describe_room() PRINT " CMD 75 just executed" As before, I thing a dspRM follows if needed. Cheers Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
PS I noticed that your case 72 (EXx,x) does not display the room if it changes it. Again it's probably not necessary. Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
OK, so you are saying that the redescribe is already handled in the specified CMD sequence of the adventures you have looked at so far? Great, jobs a good 'un then. Merry Christmas, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Yes, looks like I copied the comment about redescribing the room from the "notes" but then didn't actually implement it. Also see the TODO I wrote for case 62. Either you assume the adventure data correctly handles these cases or you use a belt and braces approach like Scottfree and make sure a redescribe always happens. Only extensive playtesting can really resolve that conundrum. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Yes, unfortunately, without an 'official' manual it's hard to tell. It may be covered by a following dspRM or a message. You might not even notice while playing the game. Anyway I have implemented commands 75, 80 and 87. They should complete the full set of commands. I'll do some testing after Christmas. Merry Christmas Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Good news Bill, I have permission from Scott Adams to distribute the enhanced interpreter AND make all his classic adventures available for download. The only thing I wanted but didn't get was permission to edit the original adventure data files, I wanted to fix the typos. Merry Christmas & Happy New Year, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3662 |
Good! (Thanks, Scott.) John |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Thank you Tom and thank you Scott! That's a nice Christmas present. Yes, there are few typos and/or spelling mistakes. I think that lets out adv13 and adv14b though. adv13 is "The Sorcerer of Claymorgue Castle". the data needs to by altered to load because the object data is formatted slightly differently. I did alter it and loaded it and the game ran OK. But early in the game you have to open a cabinet which is not listed among the visible items. It was one that also included graphics in most versions apparently and the cabinet is shown graphically. I saw it on Youtube. That may be a problem throughout the game - I don't know. adv14a does not load as mentioned before (and may not be Scott's). All it needs now (I think) is a way of selecting which game to play. I was thinking of a data file with the game titles and the file names and using that to select the game from a menu. Adv01, Adventureland Adv02, Pirate Adventure Adv03, Secret Mission etc. Merry Christmas Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hi Tom, Flushed with success I though I would try some of Brian Howarth's games. The first one failed with the same message as adv14b (not 14a as above) so I had a look further. The interpreter expects the action data to come in multiples of 2 lines. But some of the later ones and some of Brian Howarth's have an odd number of lines. FOR i = 0 TO cl STEP 2 j = i + 1 INPUT #1,ca(i,0) INPUT #1,ca(i,1) INPUT #1,ca(i,2) INPUT #1,ca(i,3) INPUT #1,ca(i,4) INPUT #1,ca(i,5) INPUT #1,ca(i,6) INPUT #1,ca(i,7) INPUT #1,ca(j,0) INPUT #1,ca(j,1) INPUT #1,ca(j,2) INPUT #1,ca(j,3) INPUT #1,ca(j,4) INPUT #1,ca(j,5) INPUT #1,ca(j,6) INPUT #1,ca(j,7) NEXT i I'm not sure why it was written like that unless it was made to make the program more obscure. It certainly didn't make it more compact. So I re-wrote it to: FOR i = 0 TO cl FOR j = 0 TO 7 INPUT #1,ca(i,j) NEXT j NEXT i That worked. I can now load and run adv14b plus those of Brian Howarth that I tried. So now there a few more available. I'll send the files back to you when I've done a bit more testing. Cheers Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, I hope you had a good Christmas. I think that lets out adv13 and adv14b though. adv13 is "The Sorcerer of Claymorgue Castle". the data needs to by altered to load because the object data is formatted slightly differently. I did alter it and loaded it and the game ran OK. But early in the game you have to open a cabinet which is not listed among the visible items. It was one that also included graphics in most versions apparently and the cabinet is shown graphically. I saw it on Youtube. That may be a problem throughout the game - I don't know. adv14a does not load as mentioned before (and may not be Scott's). I think Scott still owns the copyright, he just didn't write that adventure personally. The way to get around this stipulation that we leave the data files unedited is to code any massaging of the data for specific files into the interpreter data loading routines. i.e. if loading adventure X then replace messages/actions A,B,C with. That's what I would have suggested too. As it happens I didn't actually ask for explicit permission to package all the adventures with the interpreter, because I wasn't really expecting to receive permission to host them all for download - a pleasant surprise. Under the circumstances I'm inclined to take it as read and package them in a standalone interpreter distribution. For the Welcome Tape my intention is to update the interpreter but only include Pirate Adventure (and a pointer as to where to get more adventures) so as to keep that as legally unimpeachable as possible. You are an adventure porting machine . ' Read action table. FOR i = 0 TO cl STEP 2 j = i + 1 INPUT #1,ca(i,0) INPUT #1,ca(i,1) INPUT #1,ca(i,2) INPUT #1,ca(i,3) INPUT #1,ca(i,4) INPUT #1,ca(i,5) INPUT #1,ca(i,6) INPUT #1,ca(i,7) INPUT #1,ca(j,0) INPUT #1,ca(j,1) INPUT #1,ca(j,2) INPUT #1,ca(j,3) INPUT #1,ca(j,4) INPUT #1,ca(j,5) INPUT #1,ca(j,6) INPUT #1,ca(j,7) NEXT i I'm not sure why it was written like that unless it was made to make the program more obscure. It certainly didn't make it more compact. Actually Bill, I think you made it that verbose, my original version was the more succinct: For i = 0 To cl Step 2 j = i + 1 Input #1,ca(i,0),ca(i,1),ca(i,2),ca(i,3),ca(i,4),ca(i,5),ca(i,6),ca(i,7),ca(j,0),ca(j,1),... Next i Which I suspect more closely resembles the original TRS-80 BASIC construct ... though that would have had to use GOTO rather than FOR/NEXT. ' Read action table. FOR i = 0 TO cl FOR j = 0 TO 7 INPUT #1,ca(i,j) NEXT j NEXT i Looks good. I've had a brief look and can't find any contact details for Brian Howarth, though there are a couple of websites / copies of these adventure files that "suggest" he released them into the Public Domain. If you really want to go for gold take a look at: https://www.ifarchive.org/if-archive/scott-adams/games/scottfree/mysterious_blorb.zip as the Blorb files therein contain the in-game graphics (.PNG) for Brian Howarth's Mysterious Adventures. Find out more about Blorb format here: https://ifarchive.org/indexes/if-archiveXprogrammingXblorb.html Then I'll have to do some real work rather than pontificating Best wishes, Tom Edited 2020-12-28 03:47 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hi Tom, Yes, from the dat file: "Adventure by Scott Adams & Phillip Case" Which I suspect more closely resembles the original TRS-80 BASIC construct Yes again, because in the later versions each item of data is on a separate line. That may open a can of worms. There other cases where multiple messages would look better on the same line but the command set cannot cater for it. Display message number 1-51 does just that, there is no way for the interpreter to know if the next message would look better on the same line. I wouldn't like the job, I'd probably add my own typos. I would not be surprised if there are a few in the comments I've added to the interpreter et al because MMEdit doesn't have a spell checker for words other than BASIC reserved words. Even though I thought I checked my previous post fairly carefully I still managed to miss one. Thanks Mr Z-MIM but I think I'll leave Blorb to someone more capable. Cheers Bill PS. I forgot to say that Brian Howarth's games use the value 255 instead of -1 for objects that are in your possession. I change it to -1 when importing in advdata.inc. Edited 2020-12-28 11:02 by Turbo46 Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hi again Tom, I tried running the dump utility on a few more data files. All of the Brian Howarth files load OK but one, Arrow2. It throws an 'index out of bounds' error in advdata. The noun/verb data on one line is 837 which decodes to noun = 5 and verb = 87 but the maximum vocabulary size is 82. The data in the Blorb file is the same so I don't know about that one. I tried some of the 'otheradv' files. Marooned.dat gave a 'line too long' error. Looking at the file in Notepad and LibreOffice Writer gave no indication of extra funny characters. DOS MMBasic gave the same error reading the first line (apparently just a number). In the end I loaded it into MMEdit, went way down the file, and replaced a quote with another one so MMEdit would save it. After that it loaded OK into dump so there must have been some weird invisible stuff in that file. A hex editor might show it up maybe. I'm just about over this adventuring so soon I'll send the files back to you so you can see what I've done to them and perhaps tidy them up and design a menu for selecting adventures. Cheers Bill Addendum: I tried Epsilon's Hex Editor on marooned.dat and found that the lines were ending in a LF character and not a CR character like the rest. That must have confused MMBasic into thinking the file was all one big line. Thanks to Epsilon. Edited 2020-12-28 16:30 by Turbo46 Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, Sounds like your Labours of Hercules are almost at an end, well done. I'm surprised that the line endings are giving grief, I had thought, through experience, that MMBasic could read files with either even though it always writes CRLF. I look forward to seeing your finished result and already have some ideas for implementing the menu. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
You may not think so when you see advdate.inc. I'm sure you can improve it. Cheers Bill Keep safe. Live long and prosper. |
||||
Page 4 of 5 |
Print this page |