(71B) The Devil's Dungeon game
|
12-18-2019, 08:12 PM
Post: #1
|
|||
|
|||
(71B) The Devil's Dungeon game
This is the BASIC listing for:
The Devil's Dungeon Game From: Stimulating Simulations, Second Edition, 1982, ISBN 0-8104-5170-0 The game, as listed in the book, relies on IF commands as the first command in a multi-command line. If the condition of the IF is true, then the rest of the multi-command line is executed, if the condition of the IF is false, the rest of the multi-command line is ignored. This is apparently not legal in HP-71B BASIC, so I had to refactor the program so as to not have any multi-command lines that begin with an IF command. The game code had some 2-letter variables like YS. These were changed to 1 letter and 1 digit variables, like Y1. The game code has a number of array variables, and it also had some single instance variables using the same character, like X and X(16). These were changed to discriminate between them, like X0 and X(16). I have run the game a number of times, and it appears to be running properly, per the description and instructions in the book. This game runs well on the HP-71B with PIL-Box and the pyILPer application on an attached PC. If you have access to the Stimulating Simulations book for the instructions and examples, hopefully you may enjoy this game, too. Code:
smp |
|||
12-18-2019, 10:07 PM
Post: #2
|
|||
|
|||
RE: (71B) The Devil's Dungeon game
(12-18-2019 08:12 PM)smp Wrote: The game, as listed in the book, relies on IF commands as the first command in a multi-command line. If the condition of the IF is true, then the rest of the multi-command line is executed, if the condition of the IF is false, the rest of the multi-command line is ignored. This is apparently not legal in HP-71B BASIC... Unless I'm misunderstanding you, it is legal in HP-71 BASIC. For example: IF 1=1 THEN DISP "TRUE" @ BEEP @ BEEP ELSE DISP "FALSE" @ BEEP This displays TRUE and beeps twice. Change the 1=1 to 1=2 and it'll display FALSE and beep once. <0|ɸ|0> -Joe- |
|||
12-19-2019, 12:51 AM
Post: #3
|
|||
|
|||
RE: (71B) The Devil's Dungeon game
.
Hi, (12-18-2019 10:07 PM)Joe Horn Wrote:(12-18-2019 08:12 PM)smp Wrote: The game, as listed in the book, relies on IF commands as the first command in a multi-command line. If the condition of the IF is true, then the rest of the multi-command line is executed, if the condition of the IF is false, the rest of the multi-command line is ignored. This is apparently not legal in HP-71B BASIC... It depends on what statements follow after the initial IF. For instance, there's this sequence in the posted code: 150 IF RND>=0.01 THEN 160 155 DISP"Tremor!" @ FOR I=1 TO 20 @ L(I)=INT(X0*RND+1) @ NEXT I 160 ... If this was originally like this: 150 IF RND<0.01 THEN DISP"Tremor!" @ FOR I=1 TO 20 @ L(I)=INT(X0*RND+1) @ NEXT I then it would certainly not be legal in the HP-71B, as FOR..NEXT loops aren't admisible after either THEN or ELSE. Regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
12-19-2019, 06:46 AM
Post: #4
|
|||
|
|||
RE: (71B) The Devil's Dungeon game
(12-19-2019 12:51 AM)Valentin Albillo Wrote: ... FOR..NEXT loops aren't admisible after either THEN or ELSE. Aha! Quite right. I had forgotten about that. Thanks, Valentin! <0|ɸ|0> -Joe- |
|||
12-19-2019, 02:39 PM
(This post was last modified: 12-19-2019 02:40 PM by smp.)
Post: #5
|
|||
|
|||
RE: (71B) The Devil's Dungeon game
Thanks very much for your comments, Valentin and Joe.
Indeed, you are both correct. The original code made use of the condition being tested to execute or ignore the rest of the line, containing a for-next loop, as Valentin surmised. smp |
|||
12-20-2019, 04:18 PM
(This post was last modified: 12-20-2019 04:21 PM by SlideRule.)
Post: #6
|
|||
|
|||
RE: (71B) The Devil's Dungeon game
Excerpt from The Devil's Dungeon
The Legend … rumors of large quantities of gold hidden in a maze of caves … connecting passageways … monsters and demons … poisonous gas, tremors … the caves The Devil 's Dungeon … The Dungeon … gold … the stories … are true … sixteen rooms on each level of the dungeon … may be blocked by rockfalls … number of levels is unknown … Rooms and Passageways You will begin your adventure in Room #1 at Depth #1. The contents of the room you occupy and the numbers of the adjacent rooms will be listed. You may move to an adjacent room by entering one of the adjacent room numbers. If the output reads: MOVE FROM 2 TO?, all adjacent rooms on your present level are blocked. If a "slide" to a room is indicated, you may use it by entering that room number; however, it is a one-way passage and cannot be used to return to the first room … a list of the rooms … visited and their respective adjacent rooms … enter an 88. Descending into the Dungeon Movement to a lower depth … achieved by using a dropoff … to drop … enter any negative number when you are in one of these rooms. You will then find yourself in the same room on the next lower level … Once you have left a given depth, you can never return … you cannot move up. A dropoff … created … Magic Wand … with you at all times … use … is very risky … 40% … backfires … strength and speed are reduced by 50% … when … wand is … only alternative … enter 99 … if the wand works … clear out everything in the room … create a dropoff … if the wand backfires … remain in place with 50% … strength and speed … Magic Wand can be used repeatedly in every room except Room #1. If you enter a 99 while in Room #1, the simulation will terminate Tremors … when a tremor occurs … some passageways may be blocked … others may be opened. To determine the effect … enter an 88 … get a listing of open adjacent rooms to the rooms you have visited … Room #1 Room #1 is very important on every level. It i s the only room from which you may leave the dungeon by entering a 99. Room #1 is the only place at which you can increase your strength and speed. There are no hazards in this room. When you drop to a lower level , you will want to locate Room #1 as soon as possible. Speed and Strength … two qualities that must be maintained … to survive … both … needed to kill …speed alone … needed to run … monster … poisonous gas affects your strength … begin your journey with 100 units … speed and strength. Each time you move to another room … strength and speed decrease by your depth … any time … strength or speed … zero or less … declared dead … Experience … begin with zero experience points. Everytime you move, your experience points are increased by your depth level number … acquire up to … twice a monster's strength … by killing the monster … One point … every piece of gold found … can be traded for strength and speed, one for one … entering a zero while in Room #1 … be asked how many points … added … Monsters … monster … present … speed and strength … listed immediately after your speed and strength … elect to fight … enter a zero … monsters are faster and stronger in rooms with larger numbers and … at lower depths … If a monster hits you on your way out of the room, you will lose 20% of the monster's strength. The monster cannot hit you if you use a dropoff or the Magic Wand in its room… Demons and Poisonous Gas … 25% of the rooms on each level have demons and about 25% of the rooms have poisonous gas … Neither … can be eliminated … you can escape from them … are always in these rooms … should be avoided when possible … room with … 40% chance … cursed or gassed … if cursed … lose one-half … strength … escape … by moving to a lower level … Gold … maximum amount … of gold … stated when you enter … directly related to the room number and depth … amount of gold … actually find … given when … leave the room … a percentage of the maximum, randomly determined … cannot take gold from a room unless you move to another room on the same level . Once you l eave a room carrying gold, the gold is yours for the rest of the journey. Sometimes demons in the room with the gold will steal it as you leave. But whether you leave the room with the gold or demons steal it, when you return to that room, there will no longer be any gold there. You can take gold from a room only one time. If a monster is present in a room containing gold, you must kill the monster before you can take the gold. If you leave the room without killing the monster, the gold and the monster will remain in the room and be there when you return … BEST! SlideRule |
|||
12-20-2019, 09:07 PM
Post: #7
|
|||
|
|||
RE: (71B) The Devil's Dungeon game
I have the Vic-20 version of this book. I should type in some of the programs, and see if any would be worth converting to the Casio fx-730P (now that I actually have a cassette recorder that works with it).
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)