Pages

Sunday, 12 April 2020

RetroChallenge April 2020: Mazies and Crazies Bug Found

I've got a more fully debugged version working of Frank DaCosta's example program from Writing Adventure Games for the TRS-80 from TAB Books (1982). You can see demonstrated in the following video, the technique of using the bow and arrow by way of a cheat on startup, that puts them in the main room.  I won't tell you the secret code, but Basic programmers should be able to figure it out.


I also found what I think is a genuine bug in the printed source code. Line 240 of the QUIT and SCORE routine reads like this:

240 J=0:FORI=17TO48:IFL(I)<>1THENNEXT:GOTO242
241 J=J+I:NEXT

But it should read like this:

240 J=0:FORI=17TO48:IFL(I)<>91THENNEXT:GOTO242
241 J=J+I:NEXT

The number 91 indicates that an item, such as a piece of treasure, is in the player's inventory. This line is a part of a FOR/NEXT loop which is supposed to count up which items you have in inventory and add their value to J, which is the score variable. By searching for 1 instead of 91, the treasure items you collect never get counted and you never get any credit in your score for collecting the highest value ones (they range in value from 17-48).  Since this is an open ended RPG game, in which the purpose is to explore the 90 room dungeon until you have found the highest valued treasures and killed as many of the strongest monsters possible, this bug is kind of a bummer.

Some other changes you can see in the video besides the use of the arrow, are some slightly fixed up walls. Some of them needed adjusting because they didn't work well once condensed to half the screen width, such as the room with the chevron at the top. It didn't have a one space entrance at the bottom of the chevron as in the original. I also changed the "fire" character from a solid orange character to a checkered orange character.  Looks a little more like fire.

Some less apparent changes involve speed. I rearranged the IF checks of the monster movement routine to process blank spaces and walls first. These are the most common characters to be met as it moves, so they should be processed first so all the less frequent checks are only done when necessary-- Things like whether it runs into a potion or a fruit, for example. Found out that if the monster does run into such helpful items it gets the benefit of them instead, so don't let them get to them first.

At the end of the video you can see a 0 character. That's a bomb. If you can lure a monster onto it, it will be blow up. You can also pick bombs up to bring with you.  Just make sure to not run into it or you blow up. Move up gently and then (T)ake it into your inventory for later use.

I have emailed a copy of Mazies for the elder TRS-80 to Ira of http://www.trs-80.com/ fame.  But it can also be found here: https://drive.google.com/open?id=1xgjbd7l1JY42EmaCkjxU4yNS-XF6T2UV

My faster and more colourful MC-10 version can be played at my GameJolt Site under the "Play Our Classic 8-bit Games" link:

No comments:

Post a Comment