10.4. Glass and Other Damage-Prone Substances

| Chapter 10: Physics: Substances, Ropes, Energy and Weight |

| 10.4. Glass and Other Damage-Prone Substances

Just as Inform normally assumes everything is solid, it also assumes that these solid objects will not buckle, crack, break or deform under pressure, and cannot be fragmented. But breakability adds realism, and breakage need not be negative: sometimes we want the player to break her way in to something.

In IF the word DROP is more often used to mean "put down" or "leave behind" than "let go from a height": so it is perhaps unfair that in Ming Vase something fragile, when dropped, shatters (into nothing). In Spring Cleaning, fragile objects must be explicitly attacked by the player in order to break, and although they leave no tangible debris behind, their loss is at least remembered. Kyoto provides a general-purpose model for things being thrown at other things, with consequences including things moving (even between rooms) as well as breaking each other.

Debris from breakages is to be avoided if possible because it means keeping track of increasing numbers of objects. But we can increase realism by allowing something to have a visibly "broken" state, which it changes to when it breaks, rather than simply vanishing. Terracottissima provides for broken and unbroken flowerpots in this way.

Since "part of" allows us to have two objects joined together into what the player sees as one, it also gives us a natural seam which allows the whole to be broken back down into its component parts, and this is the neatest way of providing a breakage into pieces. Paddington demonstrates a cutting action which allows component parts to be cut away from their holders but will only make small surface gashes in any individual thing: so the player can cut something up, but only into the pieces we specifically choose to allow. Cutting also forces an opening into containers.

See Combat and Death for a robot that breaks into its component limbs when shot with a blaster

See Goal-Seeking Characters for a character who eats donuts, leaving crumbs on the floor

See Volume, Height, Weight for containers breaking under the weight of their contents

See Ropes for cutting up string into up to 35 different pieces of different lengths - a limit the player is unlikely to find out about, but a limit all the same, and an expensive solution since we need 35 different things for the "debris" when string is "broken"

97
| Example Ming Vase ATTACK or DROP break and remove fragile items from play. |
WI

In emulation of a certain annoying aspect of the original Adventure, in which there is a Ming vase that cannot safely be dropped: "Ming Vase" A thing can be strong or fragile. A thing is usually strong. Instead of attacking or dropping a fragile thing: remove the noun from play; say "[The noun] breaks into thousands of pieces!" The Cave is a room. The Ming vase is carried by the player. The vase is fragile. We could also implement an additional refinement from Adventure, that a fragile thing is safe if dropped when there is a cushion nearby. The pillow is a portable supporter. It is carried by the player. Instead of dropping a fragile thing when the pillow is in the location: try putting the noun on the pillow instead. After putting a fragile thing on the pillow: say "You set [the noun] down gently on the pillow." Test me with "drop pillow / drop vase / get vase / get pillow / drop vase". In this rule, the pillow is the second noun; if we had a general rule about setting fragile things on soft things, we could say "You set [the noun] down gently on [the second noun]." for the same effect. If we wanted to be more refined, we would provide extra code so that breaking a container or a supporter would leave behind their contents. We will see how to do that later.

123
| Example Spring Cleaning A character who sulks over objects that the player has broken (and which are now off-stage). |
WI

387
| Example Kyoto Expanding the effects of the THROW something AT something command so that objects do make contact with one another. |
WI

302
| Example Terracottissima The flowerpots once again, but this time arranged so that after the first breakage all undamaged pots are said to be "unbroken", to distinguish them from the others. |
WI

195
| Example Paddington A CUT [something] WITH [something] command which acts differently on different types of objects. |
WI

Previous | Contents | Next