Chapter 11: Out Of World Actions and Effects
11.2. Saving and Undoing

A very few titles in the IF literature - very few being still too many, some would say - restrict the player's ability to save the game.


209
*** Example  A point for never saving the game
In some of the late 1970s "cave crawl" adventure games, an elaborate scoring system might still leave the player perplexed as to why an apparently perfect play-through resulted in a score which was still one point short of the supposed maximum. Why only 349 out of 350? The answer varied, but sometimes the last point was earned by never saving the game - in other words by playing it right through with nothing to guard against mistakes (except perhaps UNDO for the last command), and in one long session.

WI

Here is one way to score this point with Inform:

Check saving the game for the first time: award -1 point.

That has the right effect, but it just isn't sneaky enough. Instead let us quietly keep track of how many times the player saves:

Check saving the game: change the number of saves to the number of saves plus 1.
When play ends: if the number of saves is 0, award 1 point.

Sneakier, certainly, but now we could get the bonus even if the game ends earlier on, so finally:

When play ends: if the number of saves is 0 and the score is 349, award 1 point.

208
* Example  Spellbreaker
P. David Lebling's classic "Spellbreaker" (1986) includes a room where the game cannot be saved: here is an Inform implementation.

WI


PreviousContentsNext