3.8. Sounds

| Chapter 3: Place |

| 3.8. Sounds

It is too easily assumed that room descriptions are what the player sees, but as The Undertomb demonstrates, they might just as easily include ambient sounds.

So Inform's "listening to" action is the audio equivalent of "examining", rather than "looking". Despite this the player can type LISTEN, which Inform understands as listening to the everything in the location at once. A simple but effective way to handle this is shown in The Art of Noise.

Four Stars 2 adjusts the idea of "visibility" to make it behave differently for listening purposes: this introduces a formal idea of "audibility".

See Lighting for heightened hearing in darkness, and the rest of "Four Stars"

48
| Example The Undertomb 1 A small map of dead ends, in which the sound of an underground river has different strengths in different caves. |
WI

95
| Example The Art of Noise Things are all assigned their own noise (or silence). Listening to the room in general reports on all the things that are currently audible. |
WI

349
| Example Scope for listening different from scope for seeing Using "deciding the scope" to change the content of lists such as "the list of audible things which can be touched by the player". |
WI

As we have seen, a well-written understand rule will often solve the problem of allowing the player to apply specific actions to objects not normally in scope. When we need to adjust scope for some other reason than reading the player's command, though, "deciding the scope of..." may come in handy. For instance, adding this to our Waning Moon example The Balcony is outside from the Resort. In the Balcony is a tomcat. The sound of the tomcat is "yowling". After deciding the scope of the player while listening: if in darkness: repeat with locale running through adjacent rooms: place locale in scope. A procedural rule while listening: ignore the can't reach inside rooms rule. would put audible objects in adjacent rooms in scope even when the player does not specifically listen to them. So the player would receive the following message when listening: >listen You hear the soothing whalesong from the Bose speaker and the yowling from the tomcat. This is because the rule that defines what we can hear inside the room, namely Instead of listening to a room: if an audible thing can be touched by the player, say "You hear [the list of audible things which can be touched by the player]."; otherwise say "A merciful peace prevails." now includes the tomcat in the "list of audible things which can be touched by the player". Touchability has been modified by our scope adjustment, but only during the listening action. Otherwise the tomcat remains in the other room and off-limits.

Previous | Contents | Next