Chapter 11: Out Of World Actions and Effects
11.4. Scoring

Not every work of IF allots a numerical score to the player: for some authors, this emphasises the idea of a game rather than a narrative. The simple sentence

Use no scoring.

abolishes the concept. Otherwise, Inform will provide built-in support for a single number measuring progress ("score"), and will expect to measure this against a maximum possible ("maximum score", which can either be set by hand or worked out automatically from a table of ranks).

An especially insidious style of bug allows the player to type the same sequence of commands over and over, earning score endlessly for the same insight, and to avoid this it is usually safest to write source like:

After taking the Picasso miniature for the first time: award 10 points; say "As they say in Montmartre: dude!"

If there are many "treasure" items like this, it is best to be systematic, as in No Place Like Home. Bosch takes another approach to the same idea, by creating a table of point-earning actions that the player will be rewarded for doing; the FULL SCORE command will then play these back.

Mutt's Adventure demonstrates how we might add a scored room feature, such that the player earns a point when he first arrives at a special room.

A single number does not really sum up a life, or even an afternoon, and Goat-Cheese and Sage Chicken and Panache offer more detailed citations. Works that are more story than game may prefer to offer a plot summary of the player's experience to date in lieu of more conventional scoring.

Finally, Rubies provides a scoreboard that keeps track of the ten highest-scoring players from one playthrough to the next.


134
*** Example  No Place Like Home
Recording a whole table of scores for specific treasures.

WI
216
* Example  Bosch
Creating a list of actions that will earn the player points, and using this both to change the score and to give FULL SCORE reports.

WI

We could, if we wanted, make a table of stored actions all of which represent things that will earn points for the player. For instance:

"Bosch"

The Garden of Excess is a room. The gilded lily is an edible thing in the Garden of Excess.

The Pathway to Desire is west of the Garden of Excess. The emerald leaf is in the Pathway.

Table of Valuable Actions
relevant action   point value   turn stamp   
taking the emerald leaf   15   -1   
eating the gilded lily   5   -1   

(And our list would presumably continue from there, in the full game.)

The maximum score is 25.

After doing something:
    repeat through Table of Valuable Actions:
        if the current action is the relevant action entry and turn stamp entry is less than 0:
            change the turn stamp entry to the turn count;
            award point value entry points;
    continue the action.

Understand "full score" or "full" as requesting the complete score. Requesting the complete score is an action out of world.

Check requesting the complete score:
    if the score is 0, say "You have not yet achieved anything of note." instead.

Carry out requesting the complete score:
    say "So far you have received points for the following: [line break]";
    sort the Table of Valuable Actions in turn stamp order;
    repeat through the Table of Valuable Actions:
        if the turn stamp entry is greater than 0:
            say "[line break] [relevant action entry]: [point value entry] points";
    say line break.

Test me with "eat lily / w / full score / get leaf / full".

This system is tidy, but limited: we cannot give actions interesting names in the score list, like "seducing the pirate's daughter" or "collecting a valuable artifact". So it will not be ideal in all situations, but it has the virtue of being easy to extend, and of listing all of the player's successes in the order in which they occurred in his play-through.

133
** Example  Mutt's Adventure
Awarding points for visiting a room for the first time.

WI
262
*** Example  Goat-Cheese and Sage Chicken
Implementing a FULL SCORE command which lists more information than the regular SCORE command, adding times and rankings, as an extension of the example given in this chapter.

WI
162
*** Example  Panache
Replacing the score with a plot summary that records the events of the plot, scene by scene.

WI
415
*** Example  Rubies
A scoreboard that keeps track of the ten highest-scoring players from one playthrough to the next, adding the player's name if he has done well enough.

WI


PreviousContentsNext