ZX Spectrum style descriptions

If you don’t know what I mean, I’ll break it down.

Inform 7 directly describes everything as though it were in a book.

I have watched walkthroughs on YouTube for text adventures on the ZX Spectrum and notice they run through descriptive environments like so:

House. Things I can see: Couch, Coffee Table, Chair, Phone, Book.


What now?

How would I replicate this in Inform 7? Or can it even be done in Inform 7 to begin with?

Thank you,


(That’s not particularly a set “feature” of a ZX Spectrum text adventure… it’s the choice of each individual author… although I will admit that it did become a standard layout for many. :slight_smile: It would, however, be unusual for non-portable objects to be listed in the “you can see” section and exits were quite often incorporated into the main location description. )

1 Like

So I don’t really have to do any elaborate programming or definition of variables/describe four hundred different Kinds of Things? I just write it right there in the room description and descriptions of objects?

Oh gosh. I feel so stupid right now!! XD I’m so sorry if this came off as a dumb question. While I have had LOTS of time practicing with I7 (and, as my Autism plays a part in the patterns of which I work on, play and study different forms of text adventures), I regret to admit I am not so fluent that I can code off the top of my head like that. Thank you for the advice, though!

Oh no! Please don’t think that my response was a comment on how to do this in Inform 7… I was merely pointing out that, although that layout was common in ZX Spectrum games, it was a distinct “ZX Spectrum thing”… It’s a layout that dates from very early 8-bit text adventures.

I’d be interested in your rationale for wanting to create an “8-bit style” layout for a modern Inform 7 game. Are you looking to create the feel of an 8-bit adventure itself? If so, then a system like Adventuron might be more suitable. You might otherwise spend most of your time fighting against Inform 7’s more modern sensibilities.


This is not too difficult to do but somewhat difficult to know how to do, since it makes use of things that are not covered together in the documentation.

Here’s a starting point that you can use:


House is a room.

A couch, a coffee table, a chair, a phone, and a book are in House. [for testing only; some not the right kinds for play]

[Various rooms defined solely to add exits for testing.]

Front Yard is north of House.

Back Yard is south of House.

Upstairs is up from House.

Bedroom is west of House.

[See WWI 18.1 What are activities? through 18.3 Rules applied to activities, 18.10 Printing the name of something, 18.25 Listing nondescript items of something, and 18.26 Printing the locale description of something. Also WWI 14.10 Responses and 14.11 Changing the text of responses.

After all that you need to poke into the Standard Rules to see the machinery being changed.] 

Before printing the locale description:
    now list writer internal rule response (C) is ", ".

After printing the locale description:
    now list writer internal rule response (C) is " and ".

For printing the locale description (this is the ZX-like you-can-also-see rule):
    let the domain be the parameter-object;
    let the mentionable count be 0;
    repeat with item running through things:
	    now the item is not marked for listing;
    repeat through the Table of Locale Priorities:
	    if the locale description priority entry is greater than 0,
		    now the notable-object entry is marked for listing;
	    increase the mentionable count by 1;
    if the mentionable count is greater than 0:
	    repeat with item running through things:
		    if the item is mentioned:
			    now the item is not marked for listing;
	    begin the listing nondescript items activity with the domain;
	    if the number of marked for listing things is 0:
		    abandon the listing nondescript items activity with the domain;
		    if handling the listing nondescript items activity with the domain:
			    if the domain is the location:
				    say "Things I " (A);
			    otherwise if the domain is a supporter or the domain is an animal:
				    say "On [the domain] [we] " (B);
				    say "In [the domain] [we] " (C);
			    if the locale paragraph count is greater than 0:
				    say "[regarding the player][can] also see " (D);
				    say "[regarding the player][can] see: " (E);
			    let the common holder be nothing;
			    let contents form of list be true;
			    repeat with list item running through marked for listing things:
				    if the holder of the list item is not the common holder:
					    if the common holder is nothing,
						    now the common holder is the holder of the list item;
					    otherwise now contents form of list is false;
				    if the list item is mentioned, now the list item is not marked for listing;
			    filter list recursion to unmentioned things;
			    if contents form of list is true and the common holder is not nothing,
				    list the contents of the common holder, as a sentence and listing marked items only and suppressing all articles;
			    otherwise say "[a list of marked for listing things including contents]";
			    say ".[paragraph break]";
			    unfilter list recursion;
		    end the listing nondescript items activity with the domain;
    continue the activity.

The ZX-like you-can-also-see rule is listed instead of the you-can-also-see rule in the for printing the locale description rules. [see WWI 19.1 On rules through WWI 19.4 Listing rules explicitly]

Rule for printing the name of something while listing nondescript items of a room:
    say printed name in title case.

Definition: a direction is viable if the room-or-door it of the location is not nothing.

Rule for printing the name of a direction while printing the locale description activity is going on:
    say printed name in upper case.

After printing the locale description of the location:
    say "Exits are [list of viable directions]."

[See WWI 8.2 Changing the command prompt and WWI 5.8 Line breaks and paragraph breaks.]

When play begins:
    now the command prompt is "What now?[line break]".

(Edit: While I was typing someone added a far more detailed description of the code I was thinking about, but I’m gonna post this up too)

I kind of want to mention Quest 5 here. It has an automatic description kind of service that sounds like what you’re describing:
When you add an object, it automatically adds a “you can see” part of the list.

In I7, I believe it’s simple enough to add a line to your code like this:

After looking: say “you can see: [list of things in the location]”;

Though I think most things that aren’t scenery are automatically listed in I7 already if they don’t have a separate initial appearance, I might track down the rule for that.

Example 350 in the documentation (chapter 18.23 about the status line) gives a sample of how to say the exits, which—once implemented—can also be inserted into the description with:

say, “[exits]”;

If that helps any.

1 Like