Chapter 7: Other Characters
7.16. Social Groups

Crowds of characters introduce new challenges, because we often want to show them interacting with one another, or to describe individuals in less detail when a whole group is present.

Strictly Ballroom gives us a set of characters who pair off each turn, making sure to mention each one once, and leaving one unfortunate person behind as a wallflower: this exemplifies how we might use a behavioral rule not to dictate the behavior of each individual separately but rather to model a whole group together. Happy Hour does calculate movements for characters individually, but then collates the descriptions, creating a single paragraph to describe whatever group is currently in the room.

Characters can also have complicated attitudes to one another, and it can be helpful to use relations to track these. Unthinkable Alliances demonstrates the grouping of characters into alliance factions, while The Abolition of Love provides a host of relations to track love affairs, marriages, memberships in families, and mere mutual respect.

Emma combines these two effects: its characters move between social groups depending on how they feel about the others in their particular talking circle, and descriptions change depending on who is where in the room.

Lugubrious Pete's Delicatessen simulates a queue at a deli, in which the customers who most impress Pete get served first.

* See Traveling Characters for groups of characters who move around and have their movements collated into a joint description


176
** Example  Strictly Ballroom
People who select partners for dance lessons each turn.

WI

Many simple repetitions can effectively be done with a "now..." instruction: it is quicker to say

now every person is angry

than

repeat with offended party running through people:
    now the offended party is angry.

Repeat comes in handy when we have something a bit more complicated to do with each item:

"Strictly Ballroom"

A person can be alert or occupied. A person is usually alert.

When play begins:
    now the player is occupied.

Dance is a kind of value. The dances are waltzes, polkas, cha-chas, charlestons, fox-trots, tangos, lambadas, and two-steps.

The current round is a dance that varies.

Manner is a kind of value. The manners are swiftly, primly, energetically, suavely, seductively, elegantly, and badly.

Every turn: now the current round is a random dance.

Every turn:
    repeat with dancer running through people who are not the player:
        if dancer is alert:
            now dancer is occupied;
            let partner be a random alert person who is not the dancer;
            if partner is a person:
                now partner is occupied;
                say "[The dancer] [the current round][if a random chance of 1 in 5 succeeds] [a random manner][end if] with [partner]. ";
            otherwise:
                say "[paragraph break][The dancer] is forced to be a wallflower. Poor [dancer]. ";
    say paragraph break.

Notice we did not say "repeat with dancer running through alert people who are not the player...". This is because Inform would draw up a list of alert people at the beginning of the repeat, and not take into account which people became occupied partway through the repetition. If we want to make sure that each person dances only with one other person, we have to continue checking alertness each time we run through the repetition.

After all the partners are assigned, we can set up for the next turn by making everyone alert again, and for this we do not need "repeat":

Every turn: now every person is alert; now the player is occupied.

Before doing something to someone: now the noun is occupied.

Before doing something when the second noun is a person: now the second noun is occupied.

Instead of doing something to someone: say "You successfully distract [the noun]."

The Pacific Ballroom is a room. "A rather utilitarian space at the moment, since this is a class and not a party." Timmy, Tommy, Joey, George, Mary, Martha, Yvette, McQueen, Linus, and Patricia are people in the Pacific Ballroom.

Test me with "z / ask linus about blanket / z / z".

343
** Example  Happy Hour
Listing visible characters as a group, then giving some followup details in the same paragraph about specific ones.

WI
229
* Example  Unthinkable Alliances
People are to be grouped into alliances. To kiss someone is to join his or her faction, which may make a grand alliance; to strike them is to give notice of quitting, and to become a lone wolf.

WI
232
* Example  The Abolition of Love
A thorough exploration of all the kinds of relations established so far, with the syntax to set and unset them.

WI
339
** Example  Emma
Social dynamics in which groups of people form and circulate during a party.

WI
426
* Example  Lugubrious Pete's Delicatessen
In this evocation of supermarket deli counter life, a list is used as a queue to keep track of who is waiting to be served.

WI


PreviousContentsNext