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 2 of 5 | |||||
Author | Message | ||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Ooops, it isn't actually but: con.println("Version 1.0", 1) is. Sorry to bother you again. I did RTFM but it didn't fully sink in. Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
OK I'm still a bit flummoxed. Is there a question here or have I resolved it? Going to sleep now, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
You have resolved my stupid question. Thanks. Good night. Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, I still think that the majority of the credit goes to Scott Adams for the design of the table based action system, so simple (ignoring the data packing) once you grok it. When you've finished your activities I may take a pass through the code and replace all Scott's original obscure 2-letter variable names with something more friendly ... that is assuming you don't have designs on porting this to the CMM1 where the short variable names would be helpful ... alas I think the CMM1 is probably "dead" which is a shame, I think it has a charm all of its own, it just needs an MMBasic update and some CSUS support. I don't think so. I'm just mucking around the edges. I'll add comments as to the changes that's all. Don't undersell your contribution. The changes to the code might be relatively simple, but the investment in testing time for these enhancements has no doubt been substantial. Thanks Bill, that would be welcome. Best regards from rainy Manchester, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
markboston36 Regular Member Joined: 27/10/2020 Location: United StatesPosts: 76 |
why not just write a new interpreter that can read these file formats? seems easier then having to deal with something that might not be yours to change. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Mark, My understanding is that strictly speaking any interpreter that Bill or I might write for this file format would be "fruit of the poisonous tree" because we have both looked extensively at the original source code from Byte magazine. Neither of us could create a "clean room" implementation based on the document I linked earlier; that is even assuming that document is not itself "fruit of the poisonous tree". I'm not really concerned. I have corresponded with Scott Adams and whilst I don't have a legal documents I have his emailed (and Facebook) permission to port/derive an interpreter for the CMM2 and distribute both it and the "Pirate" data file on the Welcome Tape. Additionally I have his permission to extend the interpreter to play his other games or "original works". I have not asked his permission to distribute his other games as I do not intend to do so. I am aware that this amounts to little more than a "Gentleman's Agreement" and I don't care. No money is involved, I have "cover" from my record of our correspondence and if at some future point one of his heirs issues a "cease&desist" order I will be both suprised/flattered that they noticed and then just shrug my shoulders and move on. Best Wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
There is no need for a 'new' interpreter I have modified the advdata.inc to read these files into the data format expected by the interpreter. The existing interpreter only needs modification to add new commands, probably created for later adventures. Pirate was his first one, Adventureland was the second. Thanks for your interest. Only because of my lack of knowledge and experience. I have also implemented the command: I believe his will allow you to 'pick up' things like chigger bites and infections. Not tested yet, that's the next job. Then I'll look at the the dreaded 73 CONT command. A chigger is apparently a little red flea or mite, the female can lay her eggs under the skin causing infections. Nice. Bill Edited 2020-12-03 09:14 by Turbo46 Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Actually Adventureland was first, an attempt to create, at least in spirit, a version of Colossal Cave/Adventure/Zork that would run in 16K. Only because of my lack of knowledge and experience. I can see I'm not going to win this "argument" and thus bow to your wisdom I believe his will allow you to 'pick up' things like chigger bites and infections. Not tested yet, that's the next job. Then I'll look at the the dreaded 73 CONT command. Excellent. And that comes from someone living in the land of venemous spiders. Best wishes, Tom Edited 2020-12-03 09:54 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Sorry, I'm wrong again. There is a list here I think all or most are in the zip file in one of your earlier posts. I probably should dump them all to find the commands missing from interp.bas so I can implement and test them. Sometimes I wonder why I am doing this. I've always liked the idea of adventure games but rarely had the patience to follow them through to the end. The snakes keep them under control. Bill Keep safe. Live long and prosper. |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3018 |
I have experience with chiggers from picking blackberries in Alabama. They are too small for you to notice them, but they migrate on your body to restrictions like belts or shoe tops, and then they, as Wikipedia says, "inject digestive enzymes into the skin that break down skin cells". Infections are rare, but the itching is maddening. Ah, but the blackberry pie! With homemade vanilla ice cream. Or for breakfast with cream (my father's favorite). You pays your money and you takes your chances. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Paul_L Guru Joined: 03/03/2016 Location: United StatesPosts: 769 |
I have experience with chiggers from picking blackberries in Alabama. They are too small for you to notice them, but they migrate on your body to restrictions like belts or shoe tops, and then they, as Wikipedia says, "inject digestive enzymes into the skin that break down skin cells". Infections are rare, but the itching is maddening. Ah, but the blackberry pie! With homemade vanilla ice cream. Or for breakfast with cream (my father's favorite). You pays your money and you takes your chances. We had about 2 acres of wild blackberries on a hillside in Walton NY in the 1940s and there were no chiggers! Those blackberries were delicious. Paul in NY |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Blackberries, when I was young there were lots of blackberries in the Adelaide hills. We used to pick them and my mother made jam (jelly?) and jam tarts (jelly pies?) from them. If I remember correctly they were full of thorns and stained your fingers. Sadly I think they've all been poisoned. No chiggers though. Bill Edited 2020-12-04 17:24 by Turbo46 Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
The interpreter: I've implemented the 74 - AGETx command and that works OK. I presume that any subsequent 52 - GETx command will complain if you have too many items in the inventory. Onto the CONT command. I've looked at the part of the database concerned: 157: DRO WAT HAS 12 IN 18 Par 12 Par 13 Par 0 MSG:54 CONT EXx,x 0 158: 0 0 IN/W 0 Par 56 Par 0 Par 0 Par 0 EXx,x 0 0 0 159: GET FIR IN/W 0 Par 0 Par 0 Par 0 Par 0 MSG:51 0 0 0 157: DRO drop WAT water HAS 12 bottle of water IN 18 bottom of chasm Par 12 bottle of water Par 13 empty bottle Par 0 ? MSG: 54 “sizzle” CONT set the CONT flag to ‘TRUE’ Exx,x swap the location of the bottle of water with the empty bottle. 0 ------------------------ CONT flag is set so probably increment something and do next entry ------------------------ 158: 0 verb is 0 0 noun is 0 " verb and noun are zero so CONTinue IN/W 0 glowing *FIRESTONE* ' item 0 Par 56 *FIRESTONE* (cold now) Par 0 glowing *FIRESTONE* Par 0 room 0 (storeroom) Par 0 ? EXx,x swap the location of the cold *FIRESTONE* with the glowing *FIRESTONE* 0 0 0 ------------------------ 159: GET not 0 so reset the CONT flag and get next command from the player I'm not sure when Par 0 refers to a room or item number or whether it is to be ignored. Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, I've implemented the 74 - AGETx command and that works OK. I presume that any subsequent 52 - GETx command will complain if you have too many items in the inventory. I would imagine so. 157: DRO WAT HAS 12 IN 18 Par 12 Par 13 Par 0 MSG:54 CONT EXx,x 0 158: 0 0 IN/W 0 Par 56 Par 0 Par 0 Par 0 EXx,x 0 0 0 159: GET FIR IN/W 0 Par 0 Par 0 Par 0 Par 0 MSG:51 0 0 0 157: DRO drop WAT water HAS 12 bottle of water IN 18 bottom of chasm Par 12 bottle of water Par 13 empty bottle Par 0 ? This trailing parameter is ignored because it is not required by any of the commands in action 157. MSG: 54 “sizzle” CONT set the CONT flag to ‘TRUE’ Exx,x swap the location of the bottle of water with the empty bottle. 0 ------------------------ CONT flag is set so probably increment something and do next entry ------------------------ Yep. In theory you also need to reset 'ip', the parameter pointer but that will happen automatically when you call do_commands() for action 158. 158: 0 verb is 0 0 noun is 0 " verb and noun are zero so CONTinue IN/W 0 glowing *FIRESTONE* ' item 0 Par 56 *FIRESTONE* (cold now) Par 0 glowing *FIRESTONE* Par 0 room 0 (storeroom) Par 0 ? EXx,x swap the location of the cold *FIRESTONE* with the glowing *FIRESTONE* 0 0 0 ------------------------ My only surprise here is that there is a condition as well as additional commands. I'm guessing that condition only applies to the commands on this line and not those on the previous despite it being a CONTinued action. So this is saying that following on from the previous action line if the player is carrying, or in the same room as the "glowing *FIRESTONE*" then exchange the "*glowing *FIRESTONE*" (Par 0) with the "*FIRESTONE* (cold now)" (Par 56). The two remaining Par 0 in that action are ignored because there is no command to consume them. GET not 0 so reset the CONT flag and get next command from the player I'm not sure when Par 0 refers to a room or item number or whether it is to be ignored. The one you annotated with the (?) is ignored as is the one you annotated with (room 0 - (storeroom)). There is only one command on that line EXx,x which just consumes the first two parameters (56 & 0), treating them as object numbers. Hope that clarifies things, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Yes, I thought of it as a separate command executed immediately after the previous one that needed a condition to satisfy the interpreter (of course I could be wrong ...again). Hope that clarifies things, It does, thanks. Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hi Tom, Well I did a bit more reading of the FM (Flamin' Manual?) and understand more of the database structure and the packing involved and how it is interpreted. Then I actually did get the CONT command working (yes!). I did use a Global though. It doesn't seem to break anything else in the Interpreter either. If you like, I can send you a copy of the interp.bas, advdata.inc and save files for the Adventureland game so that you can restore what I have done to best practice before I do any more damage to it. I should probably create a working 'script' file for testing as well and tidy up the umpteen nesting levels of IF statements in the advdata.inc file first though. Cheers Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Well done Bill, I had every confidence in you. Once you are happy with what you've got then attach it in an email to me so I can take a look. Then if I think it's necessary I'll have a word with Scott and we can make some decision on how to make it available to others. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
Hi Tom, I Hope it can be made available to others who may want to try adventure games other than Pirate. As I said in the email I sent you, I tried adventure number three MISSION IMPOSSIBLE and ran slam-bang into another problem. The first two didn't use counters but this one does. They only seem to have significance to the adventure commands within the game and not on the game interpretation, so they may be relatively easy to implement. I'm reluctant to implement any command I can't test though. The ones in question are: 77, 78, 79, and 83. There appear to be several counters: THE counter Alernate counters(0-7) The time limit, AKA alternate counter 8, AKA artificial light level. None of these appear to be used by the interpreter. Can you confirm that? Are you sorry that you started this? (I am). I'll have a look in a day or two. Do you want me to look at that before I send anything to you? Bill Keep safe. Live long and prosper. |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3848 |
Hi Bill, As I said in the email I sent you, I tried adventure number three MISSION IMPOSSIBLE and ran slam-bang into another problem. The first two didn't use counters but this one does ... I can confirm that the original "interp.bas" does not support any counters (except the light source). It sounds like you have a grasp of how it should work, and as you suggested via email a global array would seem appropriate. Not at all, but if you are not enjoying yourself then please stop. I am in no hurry, send it to me if/when you want feedback and/or it is ready. Best wishes, Tom Edited 2020-12-06 19:39 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1593 |
No, I'm not sorry but I am hooked and it's keeping me away from other projects. One thing, a few messages in the adventures span several lines. a pair of ledges. One has a bricked up window across its face the other faces a Throne-room" So far I have been concatenating them with an added space (" ") between them. Maybe it's better to insert a CRLF (chr$(13) + chr$(10)) instead to avoid the line wrapping maybe in the middle of the word. I'm assuming the interpreter could handle that? What do you think? Bill Keep safe. Live long and prosper. |
||||
Page 2 of 5 |
Print this page |