Poking around in Passage

One of the first games we played in this class was Passage, by Jason Rohrer. In this post I’m going to take a look at the source code of the game as a paratext which can aid our interpretation of the work. This approach is heavily influenced by Critical Code Studies, from Mark Marino , and a continuation of work I did last semester on a different Rohrer game, Gravitation.

The code for this game can be found on Rohrer’s website. Download the Unix Source, and starting poking around with any text editor.

In the “gamma256/gameSource/” directory we find the meat of this particular game. Most of the files are supporting libraries for “game.cpp,” the main file for Passage, so in this post I will only deal with that file. Diving into a new code base can be intimidating, and I do not yet have a perfect way to understand what’s going on. In this case, I began scrolling down, reading comments and variable names, looking for anything out of the ordinary.

The first interesting piece I found was this:

Lines 524-526:

// track whether we ever met the spouse
// separate from World’s haveMetSpouse()
char knowSpouse = false;

 

The “spouse” is monumentally important in Passage, being the only character other than your own avatar. This seemed like a good starting point, so I searched for everywhere in the file with the word “spouse.” This particular code segment is two lines of comments, denoted by the slashes, and one variable declaration. The comments are somewhat like notes in the margins to remind Rohrer, or any other reader of this code, what the next line does. And what it does is keep track of whether you have met your spouse yet.

It is interesting to note that Rohrer calls this character your spouse, rather than partner, wife, girlfriend, or any other adjective we could think of. You are married to this person, immediately.
In fact, we can pinpoint where in the code that happens.

Lines 1203-1214:

if( ! haveMetSpouse() &&
! isSpouseDead() &&
distanceFromSpouse < 10 ) {

meetSpouse();

knowSpouse = true;

startHeartAnimation(
(int)( ( spouseX – playerX ) / 2 + playerX ),
(int)( ( spouseY – playerY ) / 2 + playerY ) – 2 );
}

 

This code segment looks much more intimidating, but is very straight forward. The first three lines are the logical if statement. The “!” can be read as “not”. So all told it can be translated as approximately “If you have not met your spouse AND your spouse is not dead AND you are less than 10 units away from your spouse” then the piece of code inside the curly braces is executed. If any of those conditions are false, then the computer skips the inside part.

The inside part of course, is where you meet your wife after the “meetSpouse()” function is called. We could go track down the particular logic of that function, but from the name it is clear what it does. Somewhere in “meetSpouse()” and “knowSpouse” becoming true, you are married. How romantic.

Being married does have consequences. Here is an interesting one.

Lines 1229-1234:

int spouseExploreFactor = 2;

if( haveMetSpouse() ) {
// exploring worth more
exploreDelta *= spouseExploreFactor;
}

After you get married, you get double points for wandering around. This is clearly a part of the message of the game. Rewarding you with points for exploring at all is a message, although it is up for debate how significant these points even are. ”Go West Young Man” and seek your fortune. In Passage, the act of seeking is its own reward and seeking with a partner is doubly rewarding.

There are of course emotional consequences for becoming married.

Lines 1167-1172:

if( age >= 0.85 ) {
dieSpouse();
}
if( age >= 0.95 ) {
diePlayer();
}

This is the most famous, emotionally manipulative part of Passage. Those six lines are basically the reason we study this game at all.
They are completely black and white. At a certain age, you and all of your loved ones will die, and theres nothing you can do about it. In Passage, no matter what you do, you will outlive your spouse.

There are some interesting consequences of this. Here are two seperate, but related pieces of code.

Lines 578-579:

// use to slow player motion after spouse has died
char movingThisFrame = true;

Lines 951-956:

if( knowSpouse && isSpouseDead() ) {

// player moves slower
// toggle motion on this frame
movingThisFrame = ( frameCount % 2 == 0 );
}

 
To me, this is exciting. It excites me because I have played Passage several times in the last several years, and never noticed that you slow down after your spouse dies. Perhaps I’m just not very observant, or perhaps I still get emotionally involved by her death, but by reading the code I learned something new about the game in question.

One response on “Poking around in Passage

  1. zachwhalen

    “//exploring worth more”

    This is an interesting comment, because it implies that the “worth” in question is somehow supposed to be perceived as valuable, when my take on the game has always been that it proves the points don’t matter. The code here seems a little convoluted, though it might just be the missing context. I mean, why initialize the spouseExploreFactor variable and then only apply it if hasMetSpouse returns TRUE (I’m assuming)? I mean, it seems hasMetSpouse comprises the necessarily logic, so why use a variable to store its output?

    To me, it would have been more efficient (though perhaps less clear to read) if it’d done something like this:
    ExploreFactor = 1 + (haveMetSpouse() ? 1 : 0);
    exploreDelta *= ExploreFactor;

    Or I guess you could even do that in one line. I don’t know what else could be going on around that, though.

    Any thoughts on why he needs to declare that variable? Does it get used for anything else?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>