§9.9. Televisions and Radios
IF authors often provide clues or background information to the player by means of radio broadcasts, TV shows or video tapes because they can talk to the player without needing to listen back, or to react to what the player does. The simplest radio set, like the one in Aftershock, really only has one thing to say: which is serendipitously being broadcast just at the moment the player tunes in (regardless of when that is). The next simplest approach is to spool a broadcast on an endless loop taking several turns to play through, as in Radio Daze.
Televisions come in all shapes and sizes, and Aspect allows their shape ("aspect ratio") to be described by the player.
In Channel 1, we can also refer to the television by what it is currently showing: thus WATCH CHANNEL 4 will work if the set is indeed tuned to 4. In Channel 2, numbered channel changing is taken further: we can now TUNE TV TO CHANNEL 3, as well. Channel 2 is a reasonable base implementation of a television for many purposes.
![]() | Start of Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics |
![]() | Back to §9.8. Simple Machines |
![]() | Onward to §9.10. Telephones |
|
|
|
|
The built-in behavior of Inform is to print a line after a device is examined, saying whether the item is on or off. This is often inappropriate, and we could simply turn off that behavior in general by instructing Inform to ignore the "examine described devices rule" (see the chapter on rulebooks). Perhaps, though, we would like continue to have a short passage about the action of any switched on device; we'd just like a little more control over what it says from time to time. And in that case, we might change the rule to give a new activity control over that portion of the description:
Borrowing from the rulebooks chapter, we can replace the standard "examine described devices" rule with something that uses this activity.
Thus far we have essentially replicated the original behavior, but we've made it possible to write specialized behavior for devices, and to invoke that behavior in other places:
This might be useful for an electric lamp kind:
And with our activity, we can override the flashlight's electric lamp behavior with new behavior:
...or give special actions for the radio:
|
|
The built-in behavior of Inform is to print a line after a device is examined, saying whether the item is on or off. This is often inappropriate, and we could simply turn off that behavior in general by instructing Inform to ignore the "examine described devices rule" (see the chapter on rulebooks). Perhaps, though, we would like continue to have a short passage about the action of any switched on device; we'd just like a little more control over what it says from time to time. And in that case, we might change the rule to give a new activity control over that portion of the description:
Borrowing from the rulebooks chapter, we can replace the standard "examine described devices" rule with something that uses this activity.
Thus far we have essentially replicated the original behavior, but we've made it possible to write specialized behavior for devices, and to invoke that behavior in other places:
This might be useful for an electric lamp kind:
And with our activity, we can override the flashlight's electric lamp behavior with new behavior:
...or give special actions for the radio:
|