top expert

i am my own ghost

Let’s Make IF #5: working on the railroad.

Last time, on let’s make IF…

Yesterday, my main accomplishment was tying descriptive text to entries in a table, then linking them to what Inform 7 calls “scenes.” I also discovered–I had never look at scenes before–that I could begin and end them in a serial way, and print text based on the currently active scene in that series.

It was a productive day, and I think I picked up some new tricks.

What about today? More design questions and more text.

Discursion: the phenomenon of “railroading.”

I will be talking about craft for a minute. If you just want to read about coding, jump to the next heading.

“Railroading” is one of those things that used to turn up in reviews a lot. I think it still might, in reviews that I don’t read. I know for a fact that it turns up in playtester comments. What does it mean? In parser IF, it asserts that the player is pressured or harassed into performing an action to suit an author’s narrative goals. This, so the assertion implies, denies players the freedom many expect out of parser games.

As authors, we have to decide–it is our decision–how much freedom to grant the player. In my opinion, a good game grants only carefully measured freedom. That is, there really ought to be a thought or philosophy about what players get to do and when they get to do it. Designing the map of the game is an important part of this puzzle. I personally prefer the modular, exploded geography of Spellbreaker to the openness of Zork I, but both indicate a measure of thoughtfulness.

I think there is a certain type of parser game that can place well at competitions. The player is free, but they are also in a limited possibility space. This kind of constrained map and thing count pushes the player forward because, in many cases, the player runs out of things to do. While this phenomenon isn’t the same as narrative urgency, it does keep things moving. I’ve compared this sort of design to a funnel or even a sluice. Games of this type are almost always less than two hours long, and the most successful among them tend to have happy, victorious, and/or funny endings (there are exceptions, naturally). I don’t say this to dismiss such works. Good games made in this mold do well because they have a good design template than can yield good games. It’s as simple as that!

I only say this because it demonstrates that players don’t mind being pushed into things. They just mind feeling like they’re being pushed into things. The attrition of possibility will lead players to decide to move on. The author is responsible for the scarcity, but the player does not see the hand of the author. I often hear that parser games, by their nature, handle linear narrative poorly. Moreover, they tend to lack urgency. The “funnel” design moves things forward, but there’s no inherent narrative momentum. Railroading, I’ve found, is really about creating pressure–the author wants to drive the player forward rather than wait for the current geography to exhaust itself.

I think this is the primary problem of compelling narrative in parser games: how do we convince the player to decide to move forward while applying the sort of pressure that creates suspense, urgency, or propulsion? Long ago, as in Sorcerer‘s coal mine puzzle, games would just kill players if they didn’t keep moving. We don’t do that kind of thing anymore, which I think is for the best, but I have to admit: I was often on the edge of my seat in those days! The initial versions of Repeat the Ending had several timers that led to game ending states, but death rarely lasts in that game. Even so, I eliminated several such cases because I don’t think audiences enjoy that kind of thing.

So: without death or attrition, how do we keep the player going where our story goes? To be honest: I’m not sure. However, that is the task at hand. Marbles, D, and the Sinister Spotlight is a story-heavy game suitable for young people. It will have some interesting (at least to my beginner’s sensibilities) authorial tricks and a mechanic which I consider, for lack of a better word, cool, but this is all in service of telling a story. I’ve taken you on this long discursion so that you will understand, as we proceed, what I believe are the most difficult aspects of the game. We’ve talked about one: managing texts in a game world where the player’s perceptions of it change multiple times. The other is this: making a narrative with urgency and without railroading, pushing without being caught mid-push.

I think one answer–this always seems to be an answer–is to write compelling prose while offering interesting things to do.

Meanwhile, back at the game.

Yesterday, I wrote some text that encouraged the player to examine the box onstage. There were some nice (or so I thought) comments from Marbles about boxes, humans, and cars. Marbles also strongly suggested that we examine said box:

Anyway, it was a car-sized box made of... windows? I mean the hard stuff you can see through. It might have been black. Or maybe it was just filled with black? I thought that I should *EXAMINE THE BOX*, just in case it was dangerous for D to be around. Humans aren't very smart when it comes to survival, as I'm sure you know.

I thought about this last night, and I want to do something different. I think Marbles and D are in a hurry to get to their dinner with the Guildmaster and Loretta, so why would they look at the box? I’ve decided that while the theater will be initially dim (not dark), the exit will be clearly visible from the stage. Marbles and D will hurry there, only to discover the door is locked. D will find a lightswitch nearby, which will make it easier for him to see. I think he won’t want to do much until the lights are up, which can serve as another excuse to keep them moving. So: to start, we need a new description of At Center Stage. Some considerations:

  • At Center Stage is very cluttered. There is a lot of stuff there, but I don’t want to describe it in detail until later. That’s going to be a balancing act. It’s there, but I can’t just say, “You don’t care about that right now.” Player’s would reasonably resent that.
  • It makes sense that D would walk toward the door, even if Marbles doesn’t, right? He would probably call to Marbles from the audience area or even the door. I’ll need to have Marbles see and hear him from afar. And… vary the text, according to… scene? Something else? I have some ideas, but let’s get there first.

I’ll replace the text after the banner with this:

	say "D pulled us through a small trapdoor at the top of a ladder and set his backpack (with me in it) on a flat, hard surface. I've been around humans my whole life, so take it from me: people love hard, flat surfaces.

'It's called a [it]stage[rt], Marbles, and it's made out of wood! This is a theater where people have shows and things. Remember how I used to see puppet shows at the library? It's like that, only bigger. Y'know, I wonder: did the library stop having puppet shows, or did mom just stop taking me? I guess it's the same either way.'

The light was dim in that big, open space, which wasn't a problem for a cat like me, but D was probably having a hard time seeing. Off in the distance, way down at the other end of this human 'theater,' a pair of sturdy-looking doors waited. There was something about them that caught my attention.

'Jeeze, Marbles, it's kind of dark in here! It's honestly kind of spooky, but at least we can see the way out. It's got to be those doors over there,' he said, pointing. 'Come on, let's go have a look.' Walking down a short set of stairs, he headed for the doors.".

OK. I think that’s working better. It’s also shorter, which is probably for the best. Now I need a new room description to put in our table. D isn’t there; he’s headed north (which reminds me, I need to add down as an exit from the stage). Talking about what D is up to is going to be important. I’m not really interested in simulating D with rules like

carry out D examining the doors:

That’s really overkill. I do need a way to keep track of what he is doing and a means to tell the player about it. We’ll look at that after we get this room description written.

table of stage descriptions
present action description
prologue "[one of]If I were the type to get scared[em]I'm not![em]I might have been a little scared of this place. Something smelled off: familiar, but not in a good way. The stage was cluttered with strange shapes, and they all seemed to glob together in the dim, gloomy light. I thought D might not like being alone in the theater[em]humans are like that[em]but he probably wasn't in any danger. Probably.

If I wanted to follow him, I could head *DOWN* into an area filled with human chairs[or]This dark, gloomy space was filled with human junk. Even though I could see pretty well in this kind of light, the stage was so cluttered that it would take quite a bit of exploration to know what I was looking at[stopping]."

Notes:

  • I’ve written two descriptions. The first will print only once (when play begins). The second will print for the rest of the prologue.
  • This will be what prints while Marbles is on the stage. We still haven’t put anything in place for looking at the stage from afar.
  • D is already gone on turn one. This means that he will reach the doors on turn two. We’ll need a way to talk about his traversal as well as his actions at his destination.

Looking at D looking at things.

I think I’ve implied this but haven’t said it directly: in Marbles, D, and the Sinister Spotlight, the two main characters will work together to find a way out of a mysterious theater. To do this, they will need to be in different locations, communicating with each-other and cooperating. I think the considerations for Marbles seeing D are as follows:

  • Again, this won’t be a simulation. I’m just worried about getting the right text printed for the player.
  • I want to automate this as much as possible. I think it would be nice to “stick” D’s attention to something, then vary descriptive text about his interactions (D looks at thing, D touches thing experimentally, whatever the case).
  • I don’t yet know how deep I want this to go. Generic “D looks at [noun]” constructions? Or custom texts for each thing. This is a small enough space that I could probably do the latter if I thought it would add to the experience.

The second bullet regarding automation is the most important one right now. If Marbles dawdles before going to the door, what is the framework for describing D’s actions. We don’t want to reinvent the wheel every time he engages with something. How about another relation?

curiosity relates one thing (called the fascination) to people.
the verb to interest implies the curiosity relation.

With that in place, we can do things like

say "D knelt down, closely examining the [fascination of D]."

or

now the frob interests D.

That seems right. But how do we organize this? Do these change as scenes change? If so, that’s a lot to think about: variable text about variable things about variable scenes.

Later…

I don’t know if this is the best way to do this or not (we’re all beginners here!), but I think I should be able to mix these together:

  • A table for a fascination of D (for instance, a “table of exit doors”) could have the needed flexibility.
  • I could borrow a lot of code from yesterday, using it to check the current scene, then varying the text within that text with [one of] or [if] or [first time] specifications. Since these snippets will be much shorter than room descriptions, I should have plenty of space.

To-do:

  • I don’t have a way to tie the current fascination of D to the correct table. I’m sure there is a way, probably more than one, but I don’t know how at the moment. Thinking out loud:
    • Table names are values, but they aren’t text. I can’t think of a way to change text in a table name the way we would some printed text. Someone knows, I’m sure.
    • I probably could shuffle some values around, as in “now the right place is the table of exit doors”
    • I could use a big “to say” phrase, but I think it would be too messy for a game world full of things. For example:
every turn:
let f be the fascination of D;
if f is nothing:
do nothing;
otherwise if f is the exit doors:
now the right place is table of exit doors;
otherwise if f is the frob:
now the right place is table of frob;
otherwise if f is the elvish sword:
now the right place is table of elvish sword;
determine the current act;
choose row with an present action of the current act from the right place;
say description entry.

This doesn’t look so bad, but what if we had twenty things? Things would get pretty messy. I think what I’d like to do is have a separate configuration table.

If I had one of these…

table of fascinations
item table name
ball table of ball
apple table of apple

I could do things like this:

to say the current fascination:
	let the concern be the fascination of D;
	choose row with an item of concern from the table of fascinations;
	now d's interest is table name entry;
	choose row with an active scene of present scene from the right place;
	say description entry;
	say line break.

That reads pretty well! We’re mostly extending yesterdays code. This time, instead of dealing with room descriptions (which accept text substitutions), we’re working with table names. The rest is the same more or less. Table, scene, variable text.

The names in this demo are awful and not very readable. The project source will be better! Nevertheless, here’s something you can look at. Every three turns, the scene changes, and the fascination is randomly chosen every turn. You can see some completely flavorless (but highly conditional!) text print every turn. Just keep entering wait commands.

A snippet demo of varying text based on a relation (fascination) and current scene.

I’m going to write something simple involving D looking at the door. I wonder. Should I make this an every turn rule? An after rule? Report? Every turn would be customary. I’ll make it a generic rule, and then I can activate it wherever I want.

This is the D's remote status rule:
determine the present scene;
say the current fascination.

For now, I’ll tie that in with…

every turn when D is not in the location:
follow D's remote status rule.

My thought is that when Marbles is in the same room as D, we will handle things within the locale description process.

Whew! The source is currently in a bit of a kludge. I have D starting by the doors, and he is already fascinated by them. In-game, we’ll have to move him there rather than having him magically blink across the seating area. For now, though, Everything compiles. If you paste the source (linked below) into your own IDE, you can wait to cycle through the flavor texts. I’m just roughing things in at this point. The more I build, the easier it will be to write the text that will become Marble’s story.

Here’s a link to the folder containing each of our daily code updates.

This is today’s version of the game. For best results, paste it into your own IDE.

Next.

For the last update of the week (I think I’ll take the weekend off), I will hopefully focus on text. From a technical standpoint, I’ll need to get D from the stage to the doors, but that should be (SHOULD!) pretty straightforward. It would be nice to get initial descriptions for Among the Seats and Main Entrance. Then D can flip the light switch, ending the prologue. Things will hopefully get pretty interesting from there!