§10.8. Fire
Fire exhibits some of the properties of a gas: it is only vaguely located and tends to spread out, though it passes by touch rather than on the air. It is hazardous to life, through direct contact, heat, and smoke. Better governed, it provides light and warmth. Worse governed, it consumes almost anything it comes into contact with. Here the problem with "debris" is not so much that we need potentially hundreds of new objects to represent broken items: instead, fire could sweep through a work of IF destroying so much that no play is possible any longer. Setting up a problem in which the player must defeat a fully-capable fire is difficult to balance.
As with liquids, it is best to simulate the least amount of fire that the design will allow. Bruneseau's Journey provides a single candle which can be lit, or blown out, but where fire can never transfer from the candle's end to anything else - or vice versa: the player's source of fire, with which to light the candle, is discreetly neglected.
In the more realistic Thirst 2, a campfire is lit using a tinderbox, so that fire does transfer from one thing (tinder) to another (the campfire): but it is always confined to just these two items, and can be used only for light and warmth.
The Cow Exonerated provides a class of matches that can light any flammable object, but assumes that burning objects requires only one turn; lighting one thing does not burn another.
In Fire or in Flood provides a complete simulation of what we might call "wild-fire": combustion which spreads through arbitrary objects and rooms, destroying all in its path.
See Examining for a way to describe objects as charred once they have been partly burnt
See Heat for one consequence of fire having touched something
See Gases for an implementation of smoke without fire, if this can exist
See Liquids for water being used to extinguish a simple fire
See Lighting for other uses of candles and torches as light sources
![]() | Start of Chapter 10: Physics: Substances, Ropes, Energy and Weight |
![]() | Back to §10.7. Electricity and Magnetism |
![]() | Onward to §10.9. Heat |
|
|
Here we create a class of matches that can be used to burn other objects. Our objectives are as follow: Burned objects other than matches should be removed from play instantly (just as edible objects are instantly eaten). We could give everything its own burning duration, but that complicates matters and allows for fire to spread from one object to another; for an example of how to do that, see the example "In Fire or in Flood". Matches should be described to show whether they are burning or extinguished, and when the parser chooses one of several identical matches, it should make very clear which match it has selected. The game must sensibly select and, if necessary, automatically light new matches to carry out a >BURN THING command. The matches must burn for a set number of turns before going out, never to be used again. And finally, the part for which the text will be useful: when several matches go out in the same turn, we want the game to print
rather than
This last function appears down in Section 3, if we wish to skip ahead and look at it.
The word "matches" is used by Inform to compare snippets of text (see "Reading a command" in the Activities chapter). This can sometimes cause awkwardness if we also have a kind called "match", so for the occasion we will give our matches a more specialized name, never visible to the player:
|
|
Here we create a class of matches that can be used to burn other objects. Our objectives are as follow: Burned objects other than matches should be removed from play instantly (just as edible objects are instantly eaten). We could give everything its own burning duration, but that complicates matters and allows for fire to spread from one object to another; for an example of how to do that, see the example "In Fire or in Flood". Matches should be described to show whether they are burning or extinguished, and when the parser chooses one of several identical matches, it should make very clear which match it has selected. The game must sensibly select and, if necessary, automatically light new matches to carry out a >BURN THING command. The matches must burn for a set number of turns before going out, never to be used again. And finally, the part for which the text will be useful: when several matches go out in the same turn, we want the game to print
rather than
This last function appears down in Section 3, if we wish to skip ahead and look at it.
The word "matches" is used by Inform to compare snippets of text (see "Reading a command" in the Activities chapter). This can sometimes cause awkwardness if we also have a kind called "match", so for the occasion we will give our matches a more specialized name, never visible to the player:
|
|