Tuesday, September 16, 2014

Adventure of the Week: House Adventure (1983?)

We're returning to the early portable TRS-80 Model 100 computer this week, to tackle House Adventure, a fairly conventional BASIC language treasure hunt set in a sprawling, multi-floored but sparsely furnished house.  The author is unknown; I found this game at the Interactive Fiction Archive in the same collection as the other Model 100 games I've been playing recently, and I'm assuming these were all written circa 1983 when the LCD-display machine was the coolest tech around.  It's possible this game was written in another version of BASIC and ported to the Model 100, based on some significant bugs I ran into.



I'm going to say something I almost never say, in this case, and that is: DON'T TRY THIS AT HOME, unless you have a high tolerance for debugging your adventures while trying to play them.  House Adventure seems to have been coded without ever really being played through, and features several game-breaking bugs that I had to uncover and work around.  If you do tackle it, please consider adding a DEFINT A-Z at the beginning of the code; without it, many things don't work as I assume they were meant to by the designer, and the odds against completing the game become stratospheric.  I'll detail my struggles with the game along with the gameplay in the following, so feel free to save yourself the pain and simply indulge in the...

***** SPOILERS AHEAD! ******

The first issue I encountered was no fault of House Adventure -- I got an OM error at startup, indicating insufficient memory, but I just hadn't been doing my housekeeping.  The Model 100's entire memory space is shared -- the storage is really a RAM disk, and too much of the system's memory was used up by files.  Once I cleaned that up, the game fired up with its title screen, including a cryptic clue, "Remember the Imposter is last," displayed before the game begins.


We find ourselves in a foyer, with a wooden box and a locked door, and exits east and west.  We have //NOTHING\\ in inventory; OPEN DOOR, as expected, suggests that I NEED SOMETHING FIRST!  OPEN BOX, less predictably, indicates that I'M SORRY, BUT I ONLY KNOW HOW TO UNLOCK DOORS AND DRAWERS.  Trying to EXAMINE BOX reveals that the parser has yet more to apologize for, as it seems to interpret this as a desire to travel East, to the family room.

Since we're here, we'll note that there are no objects of interest at hand, but we can travel north or south.  South takes us to the dining room, where we can travel east to the first floor elevator.  So there must be a second floor, at least; we can also head east again or exit north from the elevator.  Going UP takes us to the second floor elevator; we can go up again to the third floor, which is as high as we go.  So the map might be fairly large.

Returning to the first floor, we exit the elevator to the east to enter a coat closet and discover a flashlight.  And, to my surprise, heading east from the coat closet wraps around to the foyer again!  So this map doesn't necessarily adhere to real-world geographical conventions.

Well, since we're back here, let's try to READ BOX -- we have to GET it first, according to the parser, and only then, once we have it in inventory, are we permitted to discover that YOU CAN'T READ THAT!  SHAKE BOX yields YOU CAN'T GO THAT WAY -- apparently no general verbs can begin with the letters E, W, N, S, U or D.  Except that's not entirely true -- WAVE BOX is recognized by the parser but has no effect.

Let's explore the rest of the first floor -- north of the family room is the bedroom, with nothing of interest but an exit east to the pantry.  The cupboard is bare -- this house is very sparsely furnished -- but we can travel north to a telephone booth incongruously placed there, or south to the kitchen.  Now things are getting a little more interesting -- there's a carving knife here, as well as a vampire.  He doesn't prevent us from continuing south to the first floor elevator, but he SEEMS TO HAVE GROWN VERY ATTACHED TO THE KNIFE AND WON'T LET YOU HAVE IT.

So this seems to be our first puzzle -- how do we deal with the vampire?  There are rules about these things in pop culture, but we don't have any obvious implements of vampire-spookery on hand, so we'll head up to the second floor and poke around there for a while.

West of the second floor elevator is a sewing room, once again bare of any items of interest, with a closet to the south containing A SMALL DIAMOND.  We can exit the closet to the south again, to find a guest room occupied by a Ming vase and an insane monk, who guards the vase much as the vampire guards the knife.  An exit west leads to another guest room, and heading west again discovers a bathroom with a brass bathtub and exits in all four cardinal directions.  We can't TAKE BATH -- I SEE NO BATH HERE -- nor can we GO BATHTUB.

Traveling west from the bathroom leads us back to the insane monk -- his affliction does not seem to be evident in his behavior, and one person's insanity can be another's deeply held faith, but we don't have to deal with his mental condition in any direct way.  South of the bathroom is a sitting room with a hairbrush we can take with us, and an exit west into a den with a banjo and a dusty moose head.  We have a four-item inventory limit, we now discover, so we'll leave these here for the moment; we can't take the moose head, anyway, but it seems we can PLAY BANJO if we pick it up later on.

West of the den is another telephone booth, this one containing 100'S OF GOLD COINS, which we also can't carry at the moment.  This is a dead end, so we'll return to the bathroom and head north into the master bedroom, with a king sized bed and another exit north.  We can't MOVE BED or GO BED, or SLEEP (unless we choose to believe we tend to sleepwalk to the south) or otherwise learn anything about it, so perhaps it's just window dressing.  Traveling north leads us back to the second floor elevator, another twist in the map.

Nothing we've found looks like it will have much effect on the vampire, so we'll take the elevator up again to the third floor.  Exiting the elevator the east, we find ourselves in a library with a Sorcerer's Handbook, guarded by a leopard.  Just on a whim, I try to BRUSH LEOPARD with the hairbrush -- and it actually works!  THE LEOPARD IS VERY GRATIFIED FOR THE GROOMING, AND LEAVES.  Now we can DROP HAIRBRUSH, TAKE BOOK and READ BOOK -- it mentions four magic words that can be used to make objects, which may help us solve some of these puzzles.  The four words are ABRACADABRA, SHAZAAM, SEERSUCKER and UGABOOM.  A warning trails off: "BE SURE TO USE THE RIGHT WORD IN THE . . ." -- so we may need to be careful using these.

Let's finish mapping before we try the magic words out.  South of the library is a trophy room, with a set of batteries and an exit west.  LIGHT FLASHLIGHT confirms that it doesn't work, until we GET BATTERIES, and then I realize the verb works differently than I thought -- we use LIGHT ON to turn the flashlight on, LIGHT OFF to turn it off.  Oddly enough, we can LIGHT ON with the batteries in hand, and then DROP BATTERIES with no apparent impact.  That flashlight's circuitry must store a lot of electricity!  We also need the batteries if we want to LIGHT OFF, though, so two of our four inventory slots are going to be eaten up if we want to keep a light source handy.

West of the trophy room is a bare living room, and going north takes us back to the elevator; the third floor is a lot smaller than the other two, just four rooms.

Okay, let's try these magic words out and see what happens... apparently, nothing if we're in the wrong place, so we may be protected against flagrant misuse.  Just for fun, let's try to SAY SEERSUCKER in the vampire's presence -- nope, NOTHING HAPPENED.  None of the other magic words do anything either here, or at the locked door in the foyer.  Do we need to have the spellbook in hand?  It doesn't seem to make a difference.

I try to GIVE DIAMOND or THROW DIAMOND to the monk, to no avail, and DROP DIAMOND just prevents us picking it back up again as long as the monk is around.  We can't FILL BATHTUB.  What about that drawers reference earlier?  I don't see any drawers around so far, and my avatar's pants remain invisible and out of reach so we'll never know about that possibility.  PLAY BANJO doesn't have any effect on the monk, or the vampire.

... Hey, this game actually has a SAVE command!  I didn't expect that.  It exits the game after we save, though we can use the BASIC CONTinue to return to the game in progress.  (This will prove extremely handy later on.)

We have nothing to KILL MONK with -- though that carving knife might be handy.  The parser recognizes WATER in the bathroom, but we can't GET WATER and of course DRINK WATER is interpreted as Down.  Can we perhaps frighten the vampire with the flashlight?  Yes!  LIGHT ON and WAVE FLASHLIGHT sends him flying away.  I guess it doesn't have to be sunlight after all!  We'll LIGHT OFF to conserve the batteries, assuming this game adheres to that convention.

Now can we KILL MONK with the knife?  We don't actually succeed in doing so, but THE MONK HAS BECOME FRIGHTENED AND RUN AWAY, which will suffice for our needs.  This gives us access to the Ming vase, but since we don't have anywhere to stash treasures yet it doesn't seem like we should fill our limited inventory with them.

Hmmmm.  Aha!  We can take the elevator Down from the first floor -- I hadn't tried that.  It's too dark down here to see, so I'll go back and fetch the batteries from the kitchen where I left them.  We can exit the basement elevator to the north or south.  South is yet another telephone booth; continuing south, we find the torture chamber, with a bag of gold and a set of stocks, also treasures it seems. 

South again is the workshop, with exits east and west.  East is a freezer, where a protoplasmic blob guards a wrinkled parchment.  There's a dirt-floored room to the east, where we could probably DIG FLOOR -- but YOU CAN'T DIG THE FLOOR?  Ah, we must ask the parser to DIG DIRT -- but YOU DON'T HAVE ANYTHING TO DIG WITH

We can continue south to an empty laboratory, and go E from here to the pumproom, where we find a can of bug spray and a savage beast.  Again, this beast doesn't block our path -- we can head south to the furnace room, with exits to the east and south.  East is a dusty coal bin, and east from the bin wraps back around to the workshop.  South from the furnace room leads back to the elevator in similar fashion.

Well, presumably we can use music to soothe the savage beast, and yes, PLAY BANJO does so -- THE BEAST HAS WANDARDED [is that like drownded?] OFF IN A STATE OF BLISS!  And now we can drop the banjo and GET SPRAY -- well, GET CAN, actually.  Might as well try to SPRAY BLOB -- and that sends it scurrying through a crack in the floor, providing access to the parchment.  READ PARCHMENT suggests that we use "THEM" IN A TELEPHONE BOOTH, IN THE LIVING ROOM, and IN THE DINING ROOM.  This information should help, assuming it relates to the magic words!

Let's try the magic words in the basement telephone booth.  SAY SHAZAAM makes us disoriented and sends us to the family room?  It looks like the locked door in the foyer has vanished, though no new exits are apparent, and we no longer need to turn on the flashlight when we go into the basement.  That's powerful magic!  Let's try using one in the dining room -- nope, none of these words seem to work here.

I'll start over and see if I can figure out how these work.  I try to SAY ABRACADABRA in the basement telephone booth, and this time I end up in the guest room.  UGABOOM goes to the pantry, and SEERSUCKER to the laboratory after subsequent restarts.  But nothing seems to change otherwise???

Let's try the first floor telephone booth instead.  Nope, nothing seems to happen here at all.  And when I try to SAY ABRACADABRA again in the basement, it seems the magic word sends me to a random destination.  What about the phone booth upstairs with the gold coins?  Nope, nothing happens here either.  So the basement must be the right place to start.

Is there an order in which we're supposed to use these incantations?  It seems like only one word works -- after that, nothing happens even in the basement telephone booth.  Does it matter which word we use where?  Let's go to the living room next and try there.  Nope.  First floor telephone booth?  Nope.  Second floor?  Nope.  Ack!

Time to dig into the code, methinks -- the magic word logic is pretty convoluted, and as it turns out, it's just plain buggy.  There seem to be two stages to it -- each stage checks to see if we're in a specific valid room, i.e. the basement telephone booth first and the dining room second, so that kind of makes sense.  But it compares X (the object of the command, i.e. the magic word) to a P array of floating point numbers that seem unlikely to ever match a value of 0, 1, 2, or 3.  It looks like P is initialized to a random value between 1 and 4, but it isn't being rounded to an integer so a match for 1 of 4 words would be pretty rare.  Z also gets randomized after a bad guess to a number that may prevent any guess from working, as there are only two possibilities, 0 and 1, and Z ends up as a floating point number between 0 and 3.  Was this feature ever playtested?  My first thought was that I should force P(0) and P(1) to something consistent so the game can be played successfully and more predictably, so I edited line 5 and attempted to restart and continue.

The next thing I learn is that if we move around too long in the dark basement without light, we end up getting killed by something unseen but gruelike in its habits and habitat, ending the game.  So we'll be more careful about that on the next try.  Saying the correct magic word in the telephone booth yields an old leather glove, and in the dining room it produces an aluminum dime.

I'm stuck again, so I try to crack the next puzzle by willing the shovel into inventory by altering the O array.  So let's try using the shovel in the dirt-floored room -- now it seems we can't DIG FLOOR or DIG DIRT either?  Ahhhh... our location is partly determined by variable Z, which is roundable to 0 but is not actually 0 when the dig logic checks our location.  So line 75 doesn't quite work right unless we force Z to a nice round 0.  Now DIG DIRT turns up a rusted key.

I'm beginning to realize what's going on here, though I wouldn't have figured it out if I hadn't recently been reading some old magazine articles about dialects of Microsoft BASIC.  The game works a lot better if we modify line 1 to start with DEFINT A-Z:  -- Model 100 BASIC supports this and now these variables all behave much better, allowing random numbers to land cleanly on an integer instead of a messy floating point value that won't match many game logic comparisons.

I remove my modifications to line 5, to be a good sport now that I've realized where House Adventure's biggest issue lies, and it takes me a few tries, but SAY SHAZAAM in the basement telephone booth yields the old leather glove, and SAY ABRACADABRA in the dining room produces the aluminum dime.  Nothing ever happens in the living room, though, so the parchment is a little misleading.

Now the telephone booth room on the second floor takes us (as I'm sure the author intended) back to the telephone booth on the first floor; actually, this is randomized, taking us to different telephone booths each time we enter one.  And I find the rusted key and a clove of garlic on the floor of the dirt-floored room, without having to do any digging; not sure if that was intended, but it works for me.

With the rusted key, we can finally UNLOCK the DOOR in the foyer.  This lets us go to the front porch, where we can see the front yard, and I suspect this is where we need to bring treasures.  It also appears that monsters now run away but turn up elsewhere, as they are not randomized away into nonexistent rooms any more,so we need to keep track of where we left important items for shooing them off again.

Let's round up the treasures we know about -- the diamond, the gold... and it turns out the set of stocks are not stock certificates as I was picturing, but actual non-portable as-in-"put-the-prisoner-in-the" stocks (it's a torture chamber after all!)  The wooden box also counts -- it seems we get credit for hauling anything not nailed down out to the front porch!  The hairbrush, the sorcerer's handbook, the... uh-oh.  I've run into the leopard again, and after we take items out of the house, they disappear!  So perhaps we'd better collect things in the foyer instead, in case we need them again.

Starting fresh, it seems some items are randomized, and I'm seeing some objects I didn't encounter before, like a block of dry ice in the dining room.  And I exhaust my flashlight batteries before I manage to get anything out of the house.  Sigh.

The batteries only last 40 turns, tracked by a variable U in the code, and with the tight inventory limit it's pretty difficult to get everything out of the basement.  There's also no clear victory condition when we die or quit -- just a score for how many items we got out of the house?  I cope with the battery life by occasionally doing a QUIT, U = 0, CONT sequence.  Yes, it is cheating.  No, I am not ashamed of myself. I don't think it's possible to carry a light source and remove everything from the basement in 40 turns, and if we wander in the dark for more than a few turns we are consumed by an unseen menace, so that's not an option.

What's going on with the telephone booth rooms?  They seem a lot more stable since I restarted.  Do they react to having the dime in inventory?  Yes!  Now they start teleporting us randomly around again.  But while the design intends for it to be possible to reach a "secret" fourth telephone booth in a separate section of the third floor we can't otherwise reach, it's nearly impossible for this to happen given the random number algorithm used in line 7.  This can be patched imperfectly by changing the code to randomly pick a number between 0 and 5, instead of 0 and 4; the odds of it being greater than or equal to 4 are much better now.  (After the fact, I realize that multiplying the random number by 4.999 would prevent a bad value of 5 from coming up without substantially altering the odds of it being 4.)

Good, now we randomly find ourselves in a new telephone booth, with an exit to the east.  This leads to a barroom with a block of dry ice, and an exit leads east to the game room.  North of this point is the computer room, with a UNITRON 30/50 MAINFRAME and a shovel.  Traveling north of the computer room takes us back to the first floor telephone booth.

Finding our way back again, we establish that south of the game room is the art hall, where we see a silk pillow and a werewolf, guarding it of course.  To the west is a nondescript bedroom.  We can WAVE GARLIC (is that canon?) to ward off the werewolf and take the silk pillow, so we can take the Ming vase formerly guarded by the insane monk (a steal from Colossal Cave there, though more insistent in implementation, as we can't drop the vase at all without the pillow present.)

I try to use the glove to take the dry ice, but I end up dying with a scream, followed by "REMEMBER?"  Hmmmm.  Maybe that's what the imposter business on the title screen is about -- the dry ice in the living room is not the real dry ice?  Or it's the last thing we should take out of the house?  Or dry ice is an imposter for real ice?  There are two locations where it appears, though, so that's probably what this means, especially as we have to get into the hidden telephone booth area to find the real one.  I think.

I grab the shovel from the computer room and finally DIG DIRT in the dirt-floored room, but nothing comes up.  At least we can dispose of the shovel.  I haven't grabbed the diamond from the closet yet this round, so I'll do that.

Now let's see if we're allowed to pick up the dry ice from the barroom... yes, we can GET ICE here without dying.  We do need the glove in order to do so -- if we try to drop it first while carrying the dry ice, we're prevented: YOU'LL BURN YOURSELF IF YOU DROP THE GLOVE NOW!  So that's done, but it seems I'm still short an item, namely the hundreds of gold coins from the second floor telephone booth.

We can't GET COINS directly, but if we have the wooden box in inventory we can.  And after we drop it and all of the other remaining items outside, victory is ours -- with an end message that's just as bugged up as the rest of the game!



Playing House Adventure was not a great deal of fun -- it took a lot longer than I was expecting due to its general quality problems, though somehow it kept drawing me back, probably because having the source code made it possible to finish, in theory at least.  I was able to fix a couple of game-breaking bugs, though I also had to cheat quite a bit to extend battery life and occasionally continue after an untimely demise. 

And this completes my tour through the handful of TRS-80 Model 100 text adventures I currently know to be in circulation -- pity this last one was probably the least polished of the batch!  Onward!

1 comment:

  1. Thanks. Great discussion of an obscure and frustrating, but strangely compelling game. I have fixed many of the oddities you noted. The strange wrap arounds in the map. Now you have 60 moves with the flashlight, not just 40. When wandering in the dark, you will die less quickly. All the problems with integers related to the random numbers are fixed. Few spelling errors corrected. Now when carrying the dime into a phone booth you are guaranteed to be transported to one of the other booths. You have a 5 item limit, instead of 4. Formatting of the final victory message is fixed. When the monsters get relocated, they don't get sent to the Foyer, where you can drop your items before getting the key and transferring them outside. This prevents an arbitrary game loss simply because the monster has gone there and can prevent you picking up items. Bit of a shaft really. Also, the 3rd floor phone booth will always transfer you to another phone booth, so you can't get trapped on the 3rd floor before getting the dime.
    HOUSE can be tried here: http://faculty.cbu.ca/jgerrie/MC10/JG_M ... dings.html

    ReplyDelete