Exploring multisensory descriptions in Inform7

Over the past week I’ve been experimenting with different ways to make an interestingly playable game where the player’s point of view can be multisensory in various ways. So, for example, a character who is hearing and sighted would experience visual, sound, touch, and scent based room descriptions, while a Deaf character would not get the sound descriptions.

One way is to use Touchy Feely extension by Quantum Games. I ended up forking this and adding a few things to fix a couple of errors in the extension, and then adding more options as default descriptions for items. This extension builds in some commands like smell, touch/feel, listen, and taste. You can set the sound of a room, a person, or an object very easily just like you set the (visual) description.

With those rules, and a few others, I started writing rooms like this:

The Bedroom is a room.
The description of the bedroom is
"[if the player is sighted]A small room with white walls and some posters hanging up. The bed has a colorful striped bedspread and paisley sheets. The doorway is in the west wall.[end if]
[if the player is hearing] There is an air filter humming loudly in the corner.[end if]
[if the player is not sighted and the player is not hearing] A small room with a bed in it. The west wall has a wide doorway.[end if]"

The sound of the bedroom is "A loud air filter in the corner fills the room with white noise."
The scent of the bedroom is "The air in here seems very clean and fresh."
The bed is scenery in the bedroom. The description is "A soft, comfy bed. You give it an experimental bounce."
The pillow is scenery in the bedroom. The description is "A nice, soft, squishy pillow."
The bedspread is scenery in the bedroom.
The bedsheet is scenery in the bedroom.
The air filter is scenery in the bedroom.
The doorway is scenery in the bedroom.
The walls are scenery in the bedroom.

Things that are scenery aren’t described until you examine them. I wrote a general search command called (explore, or tap ) which conveniently lists all these “scenery” aspects of a room for non-sighted characters. Sighted characters have to examine them one at a time.

The problem with this method is that it is clunky and I’m repeating various elements of the room description. Ideally, I’d be able to replace a bunch of Inform7 behavior so that:
– Each room (and thing) can have a visual, sound, etc description.
– The game checks if the player has those senses
– The game concatenates the various sensory descriptions appropriately

This turns out to be difficult. I got into reading the Standard Rules (which, from the Inform7 IDE, you can see as an extension) and then realized what I wanted to do was basically happening in the Carry out looking (this is the room description body text rule): section of code. I thought maybe I could hack in a check on the sound of the room and print that.

But! This code refers to the Inform6 core of the game, with

To print the location's description:
(- PrintOrRun(location, description); -).

I tried copying THAT and doing something like PrintOrRun(location, sound), which didn’t work because location and description here are constants from Inform6, I think.
Not sure how to pursue this further. Maybe in future as I get more familiar with the guts of Inform.

So, I tried another way. I suppressed the room description body text rule like so:
The room description body text rule is not listed in any rulebook.
And copied it and pasted it into my example game with a slightly different name.

Carry out looking (this is the room descriptions body text rule):
if the player is sighted:
if the visibility level count is 0:
if set to abbreviated room descriptions, continue the action;
if set to sometimes abbreviated room descriptions and
abbreviated form allowed is true and
darkness witnessed is true,
continue the action;
begin the printing the description of a dark room activity;
if handling the printing the description of a dark room activity:
now the prior named object is nothing;
say "[It] [are] pitch dark, and [we] [can't see] a thing." (A);
end the printing the description of a dark room activity;
otherwise if the visibility ceiling is the location:
if set to abbreviated room descriptions, continue the action;
if set to sometimes abbreviated room descriptions and abbreviated form
allowed is true and the location is visited, continue the action;
print the location's description;
if the player is hearing:
say "[sound of the location][paragraph break]";
otherwise:
say "[feel of the location] [scent of the location] [taste of the location] [paragraph break]";

Because I’m not using the “print” function the sound and other sensory qualities of the room are described under the actual room description. That might be OK but now I need to learn how to elegantly write a room description that is broken out into visual, sound, and other qualities. I also need some kind of bare bones description that doesn’t show to the player unless the player character is deaf-blind. This will take some practice to learn to write well, and some more refining of how I show which bits of the descriptions.

Note that I will probably be adding in low vision and hard of hearing (by taking the visual and sound descriptions and munging them a bit.)

Leave a Reply

Your email address will not be published. Required fields are marked *