Monday 7 February 2022

Jim Menick's "Space Derelict" (1984)


Strident over on the CASA Text Adventure archive was doing a little research into Jim Menick, an author of a type-in how-to book "Basic Adventure and Strategy Game Design" from 1984. He mentioned that the book was published for the Apple II and TRS-80, but that there didn't appear to be any playable version of the game on the archive or anywhere out there on the Net. There was also supposed to be a version for the IBM PC Jr. but the demise of that machine apparently took that edition with it.

Strident posted a place to get a scan of the TRS-80  version of the book:

https://archive.org/details/Basic_Adven ... lications/

Garry, another frequent contributor to the Classic forum on CASA and a typer-in and fixer of games, already had the game in progress.  He noted that there weren't any copies of the Apple version of the book available in scanned form online, but that he had started converting the TRS-80 listing into working code.  It was specifically programmed for the TRS-80 Model 4, which presented some problems, as that was a rather unique later version of the TRS-80 Model 1 line.  For example, it had an 80 rather than 64 column screen.

I decided to take a look at the TRS-80 scan, and realized it was pretty clear. Most of the source code listing could be easily copied from the PDF without too many errors, so I undertook to convert it into an MC-10 program. But first I had to get it back into a readable form for its original TRS-80 Model 4 form as printed in the book. For those interested a fairly bug free version can be found (DERELICT1.TXT) on my Github.

https://github.com/jggames/trs80mc10/tree/master/quicktype/Text%20Adventures/Derelict

However, if you want a fully debugged version, it would be better to dig up Garry's conversion.  Also, my version had to condense some of the descriptions in order to get it all to fit in 20K.  I don't think anything critical has been omitted and in some cases the descriptions are perhaps even a little clearer and more elegant (a conceit on my part, I'm sure, but hey, it was a lot or work converting the program).  However, I did make one stylistic change that actually takes a little more space, which was to get rid of all contractions in the robot's responses.  Real robots and Androids, as commander Data teaches us, don't use contractions.

Garry notified me of a couple of bugs from his early notes. "In line 13130, '3180' should be '13160'. In line 6570, '5760' should be '6760'." I had already found the 6570 bug but not the other one. I also found an error in 5950, where it should print the A$(19) message instead of the one listed.  Garry also found another bug he notified me of later on, which  prevented you dropping anything: "In line 6570, '6950' should be '6590'."  I had already fixed this bug in the midst of my rationalization of the code to shrink its size to fit in 20K for the MC-10.

We both ended up tearing out our hair because we couldn't get past one of the first puzzles.  You get fried going into a room in the early stages that you clearly need to get into (you can see into it from a prior room).  Turns out that you have to be carrying a pentagon and a crystal, which together form a telepathic device for opening doors.  You have to "think open" in rooms with locked doors while carrying both items.  This includes the room you get fried going into.  But by using the telepathic pentagon and crystal doors will open (or in the case of that room, disengage whatever safety device that is frying anyone who enters.  In other cases you must "click" the pentagon.

I realized there was a walkthrough provided by Menick on pages 21-22 of his book that describe this, but it was not entirely clear. He also provides a map, with numbered rooms.  To get into room 5 (the frying room) you have to THINK OPEN or SAY OPEN in room 11 (the one where you can see into 5). You have to be carrying the pentagon and the crystal you can get from room 7 (by clicking the pentagon) for this to work. Menick admits in his walkthrough that this "mind trick" is a bit of a devious puzzle, although there are some clues.  For example, when you carry the crystal into the hologram you get a subliminal message saying "THINK HUMAN."  But I think there might be an error with the messaging in room 11. Menick's walkthrough description indicates that the player should be able to LOOK OBJECT and see that the burnt metal thing in room 5 is a fried robot. I think this is supposed to be your warning to stay back, but it didn't work on my version. But I can't be sure if that was a result of my conversion hacking or not.  In any case, I fixed it in my version so that you can LOOK OBJECT and see the fried robot.

Despite its relatively small size as an adventure there are lots of puzzles in this game and (as was typical) more than a few sudden deaths.  Menick tried to provide many synonyms (some of which I had to remove to save space) but there are still a few guess-the-verb situations.  There is a lack of abbreviation for things like INVENTORY and the non-standard directions like NORTHEAST. 

There were a few elements of descriptions that Menick mentions in his walkthrough but which don't appear in the actual game, such as the climbing ropes in the exercise room. They're not in the description, but if you CLIMB ROPE, you die (clumsy robot?).  CUT ROPE will allow you to get piece of rope if you have found the knife, but all this serves no purpose, as the rope element is a red herring.  I added the ropes to the gym description in my version.

It was like Menick was still tweaking the code when it went to press, or perhaps he only hurriedly converted it from Apple BASIC. Strident mentioned that he found biographical info on Menick that indicated that he was primarily an Apple user. This seems likely as the TRS-80 code is quite simplistic, and as a result, a little bloated. It was tough getting it down to under 20K.  I had to convert the room messages being loaded from disk, which relied on creating a special data file, and simply make them all into DATA statements.

But on the whole, I quite liked the creepy space derelict story and the robot-at-your-command idea that Menick uses to allow you to explore the ship at a distance. When the robot dies you just get a chilling repeated "END TRANSMISSION" message. The bugs were not of the game breaking type, just annoyances that somewhat spoil an otherwise neat little game. For example, you could press the green button to open the door into the ship without having pressed the black button to close the outer door without triggering explosive decompression. Menick sets a variable AL=1 for when the outer airlock door is closed, but he doesn't use again. I changed that. Now its black before green and you're keen, green before black you ain't coming back. I know the ship has air because there are footprints in dust on the floor and things aren't floating in a vacuum, etc.

The book is a little turgid, but having written some turgid pedantic books myself I'm not going to be overly critical.  And most of the how-to books of the time were like this. The code was very simple, which is perhaps justified for its pedantic purpose. Multiple repeated IFs for everything, including the handling of every movement. I've seen games with 3 times as many rooms and messages but about the same byte count because not all of it was eaten up by program commands (so many IFs!). Still, a neat premise that actually works out well for a little 8-bit BASIC adventure of the time period. However, I think Menick is a better fiction author than an elegant coder, although he gets the job done.  And he does suggest in the book that it is up to the reader to take the programing further.  I think I've fixed most of its annoyances in my version, so I took his advice.

Thanks to Strident for the original suggestion and to Garry for all the debugging tips.

Now I might take a crack at his five person poker game in the second half of the book, which is a demonstration of the "strategy" part of his title.  Converting "Space Derelict" was a fun little exercise in bringing an old program back to life from digital oblivion.  Perhaps his poker program might demonstrate some interesting elements of early AI programming.  He does mention that he tried to give all of the opponents playing styles from different people he actually knew.  I'll keep you posted.  In the meantime if you want to help bug test/try out DERELICT it can be played in Mike Tinnes online emulator here:


If I can get hold of Menick, I will hopefully be able to arrange permanent access to the program from my site.

No comments:

Post a Comment