8. Vehicles, Animals and Furniture

Recipe Book

RB §8.1 Bicycles, Cars and Boats

The vehicle kind in Inform refers to an object which can carry at least one person, but is small enough to fit into a single location:

In the Garden is a vehicle called the motor mower.

We can then apply different rules to a player going somewhere on foot or in the vehicle. Peugeot (a bicycle) is an easy example; No Relation (a car) adds an ignition switch to the vehicle; Straw Boater ★★ (a motorboat) gets around areas of lake where travel on foot is not just slower but impossible.

Hover ★★★ (a sci-fi "hover-bubble") changes the appearance of the landscape when it is seen from inside the vehicle.

See Also

Ships, Trains and Elevators for larger conveyances.

Examples

27.
A journey from one room to another that requires the player to be on a vehicle.
104.
A car which must be turned on before it can be driven, and can only go to roads.
49.
Using text properties that apply only to some things and are not defined for others.
29.
Hover ★★★
Letting the player see a modified room description when he's viewing the place from inside a vehicle.

RB §8.2 Ships, Trains and Elevators

This section covers vehicles whose interior consists of at least one entire room. Moving into this room constitutes boarding: there is then some pause while it travels: moving out again disembarks at a different location. The only complication arising is how the player controls the journey (by talking to someone? by pressing buttons? by steering?).

The Unbuttoned Elevator Affair provides the simplest possible whole-room vehicle, which ferries between two fixed points. If you are at one of these, it must be the other one you want to get to, so there is no need for controls.

Dubai ★★★ is a much more elaborate elevator, with many possible destinations, chosen using buttons inside the elevator.

Empire ★★ simulates a train journey. Here there are no controls as such, but the train passes through a sequence of stops spaced apart in time, so the player chooses an exit by getting out at the right moment.

On a very large, slowish craft such as a cruise liner, we are not so much travelling in a vehicle: it's more as if we are visiting a whole building, which becomes our world for the (probably long) duration of the journey. The liner steers around in long, slow curves, changing its orientation in the water, so that (if we think of "north" as a strictly magnetic matter, anyway) north is constantly rotating: something we don't notice on board because our own reference points, provided by the ship itself, stay fixed relative to ourselves. Because of this, some ships in IF are navigated using FORE, AFT, PORT and STARBOARD directions rather than NORTH, EAST, SOUTH and WEST: see Fore ★★★.

See Also

Bicycles, Cars and Boats for smaller conveyances.

Examples

A simple elevator connecting two floors which is operated simply by walking in and out, and has no buttons or fancy doors.
145.
Empire ★★
A train which follows a schedule, stopping at a number of different locations.
42.
Fore ★★★
Understand "fore", "aft", "port", and "starboard", but only when the player is on a vessel.
271.
Dubai ★★★
An elevator which connects any of 27 floors in a luxury hotel.

RB §8.3 Animals

Animals exhibit a wide range of behaviour: much of the chapter on Other Characters applies just as well to animals as to human beings, with the exception of the material on conversation. But two examples here, both fairly simple, show how a fairly convincing domestic pet can be achieved simply by reacting to certain events going on nearby: Feline Behavior (a cat) and Today Tomorrow ★★ (a dog).

Fido provides a dog which the player can re-name at will.

For animals that we can sit on and ride - a camel or a horse, say - we may want to use the Rideable Vehicles extension by Graham Nelson, which also provides a rideable animal kind.

See Also

Liveliness for pets that change what they're doing every time the player looks.
Bags, Bottles, Boxes and Safes for a cat that eats food put in its container.

Examples

A cat which reacts to whatever items it has handy, returning the result of a rulebook for further processing.
419.
Fido
A dog the player can name and un-name at will.
99.
A few notes on "In the presence of" and how it interacts with concealed objects.

RB §8.4 Furniture

Most domestic furniture consists of supporters and containers of one size or another. This means that the simplest furniture needs no elaborate instructions:

The candlestick is on the dining table. The dining table is fixed in place.
The silver salt cellar is on the serving trolley. The serving trolley is pushable between rooms.
The pillow is on the bed. The bed is enterable and fixed in place.

The examples below are therefore mostly ways to get around the usual restrictions on containers (that they only have one interior) and supporters (that they cannot simultaneously be containers as well).

Yolk of Gold ★★ provides a set of drawers, that is, a container with multiple interiors.

U-Stor-It ★★★ provides a way to have containers with a lid which is also a supporter.

Swigmore ★★ provides a supporter which holds up the player, but has no top surface as such, and cannot hold up anything else. Kiwi demonstrates a kind of high shelf, whose objects cannot be seen or used unless the player stands on a ladder.

Princess and the Pea shows how a pile of supporters, each on top of the last, could be managed.

Tamed demonstrates furniture large enough to get inside, or on top of.

Circle of Misery demonstrates a conveyor belt, which can hold multiple items but only brings one of them within the player's reach at a time.

See Also

Position Within Rooms for a box that can be positioned and used as a stepping stool.
The Human Body for letting the player take different postures on furniture or on the floor.
Room Descriptions for tables and other furniture whose content listing is suppressed or modified in a room description.
Entering and Exiting, Sitting and Standing for making the player automatically rise from a seat before leaving the room.
Clocks and Scientific Instruments for a grandfather clock.
Kitchen and Bathroom for a mirror the player can look into.

Examples

13.
Tamed
Examples of a container and a supporter that can be entered, as well as nested rooms.
The player is unable to sleep on a mattress (or stack of mattresses) because the bottom one has something uncomfortable under it.
361.
Kiwi
Creating a raised supporter kind whose contents the player can't see or take from the ground.
Retrieving items from an airport luggage carousel is such fun, how can we resist simulating it, using a list as a ring buffer?
83.
Set of drawers where the item the player seeks is always in the last drawer he opens, regardless of the order of opening.
397.
Adding a new kind of supporter called a perch, where everything dropped lands on the floor.
58.
U-Stor-It ★★★
A "chest" kind which consists of a container which has a lid as a supporter.

RB §8.5 Kitchen and Bathroom

Before implementing elaborate mechanisms to handle plumbing, we should pause to ask ourselves: how much of this do we need? Is it really necessary to simulate the complete set of fixtures and fittings?

This turns out to be a little tricky to do, and also rather dull to set out. The example Modern Conveniences ★★ was actually written as a demonstration of how an extension to Inform might be written to provide a general "kitchens and bathrooms service" for writers, but it contains a nice implementation well worth borrowing. The idea is to provide a "kitchen" kind of room and a "bathroom" kind of room. All kitchens created automatically contain standard kitchen appliances: fridge, freezer, sink with taps, counters, cabinets, and a stovetop with built-in oven. Similarly, all bathrooms will have sinks, baths, cabinets, and toilets, and respond to some standard interactions.

Another common feature of bathrooms is a mirror: Versailles ★★ demonstrates how to create a simple one.

Examples

75.
Versailles ★★
A mirror which will reflect some random object in the room.
Exemplifying the kind of source we might use in writing extensions for kitchen and bathroom appliances.