9.4. When play ends

| Chapter 9: Time |

| 9.4. When play ends

Short of something like a power cut, the game can only end when one of the two participants chooses to end it: either the player, by deciding that enough is enough, or us.

In story-telling, there are many kinds of ending: happy, sad, decisive, bittersweet, surprise. Inform doesn't try to interfere in that kind of artistic choice, but it does need to know one thing about the ending: is it final, or not? Many authors like to make additional menu items available if the player has completed the story right through, but not if she has reached an early or wrong ending. (See the activity "amusing a victorious player", for example.)

end the story

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is not considered final.

end the story finally

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is considered final, and any hidden menu options will be revealed.

end the story saying (text)

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is not considered final. Example: end the story saying "You have been stymied"

end the story finally saying (text)

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is considered final, and any hidden menu options will be revealed. Example: end the story finally saying "You have defeated Sauron"

The closing message is traditionally set out in asterisks:

> *** The End ***

This style is traditional in IF, and go back to 1980 if not earlier.

We can test the current state like so:

if story has ended:

This condition is true if an end has been declared using one of the "end the story..." phrases.

if story has not ended:

This condition is true if no end has been declared using one of the "end the story..." phrases.

if story has ended finally:

This condition is true if an end has been declared using one of the "end the story finally..." phrases, so that an ending has been reached which the author feels is a completion of the player's experience.

if story has not ended finally:

This condition is true if an end has been declared using one of the "end the story..." phrases, but not "finally", so the author feels that the player can get further experience by playing again and trying different approaches.

The rulebook "when play ends" is the matching bookend to "when play begins". It is followed when the game decides to end (not when the player simply gives up and quits), and before any epitaph like

> *** You have been poisoned ***

appears. For example:

> When play ends, say "Oh dear."

Surprisingly, the end is not always the end:

resume the story

This phrase causes an ended story to resume exactly as if no "end the story..." phrase had been used. Example: When play ends: if the story has not ended finally: say "Oh dear. Still, here's another chance."; resume the story. The phrase is likely to be sensible only as part of a "when play ends" rule. Other traditional uses include giving the player three lives, as in an old-school arcade machine.

| In earlier builds of Inform, the wording of these phrases was different. There was only one possible way to end finally, which caused some authors trouble, but otherwise the functionality was about the same. The change was really made to recognise that modern IF is about story-telling, and shouldn't assume that everything is a matter of life and death. The following shows the old, now deprecated, wording, together with equivalents in the new wording: end the game saying (text)
A phrase now deprecated and equivalent to: end the story saying ...;
end the game in death
A phrase now deprecated and equivalent to: end the story saying "You have died";
end the game in victory
A phrase now deprecated and equivalent to: end the story finally saying "You have won";
resume the game
A phrase now deprecated and equivalent to: resume the story;
if game ended in death:
A phrase now deprecated and equivalent to: if the story has ended and the story has not ended finally, ...
if game ended in victory:
A phrase now deprecated and equivalent to: if the story has ended finally, ...
if game is over:
A phrase now deprecated and equivalent to: if the story has ended, ...
if game is in progress:
A phrase now deprecated and equivalent to: if the story has not ended, ...

138
| Example Big Sky Country Allowing the player to continue play after a fatal accident, but penalizing him by scattering his possessions around the game map. |
RB

Previous | Contents | Next