Mailbag: World Simulation for Story Generation

Hi Emily,

not sure if this is too specific a question, but I wonder if you can help me out:

Last NaNoGenMo I started out on doing a more sophisticated version of Meehan’s Talespin. I ended up doing lots of planning, but not too much implementation, so I’m going to continue my efforts this year. The biggest part of it all seems to be a world simulator. This would be where all the actions the characters are planning to do get executed. In a way this seems very similar to what is part of every IF/adventure game (locations, objects, etc), and I have programmed some of those in my micro computer days on a ZX Spectrum… But I feel this needs to be more sophisticated (and on a larger scale), and general, as there will be a multitude of possible actions that can modify the world state. And it might also have to be ‘fractal’ (for want of a better word), as there is landscape in the wild, cities (which are in the landscape, but consist of many locations where there would otherwise just be a single location of forest), and rooms in houses in cities, etc.

Are you aware of any systems in existence that I could use for that? I am kind of hoping it would be similar to a physics package for arcade games, a ready-made package that I can slot my content data and planner actions into. Or do I have to write my own?

Any pointers much appreciated!

I’ll try to answer this in its own terms below, but first I feel like those answers should come with some warnings.

This is presumably obvious, but there is no such thing as a generic world simulator. Any simulation is making decisions about what to model and what to ignore, what level of abstraction to use, what kinds of state are interesting to preserve, and so on. It’s misleading to think of “a world simulator” as “like” a physics engine. A physics engine is a type of world simulator, one that focuses on a comparatively well-defined kind of state: position, velocity, acceleration, elasticity, and so on. (I don’t mean it’s easy to write a good one! Just that the domain of simulation is reasonably defined.)

Text adventure world models tend to focus on rooms, furnishings, and items of the proper size to be carried by a human being, but that’s also very much a subset of what you might theoretically want to model. Items that are abstract (“love”, “communism”), intangible (“the smell of grass”, “a traumatic memory”), larger than a room (“Antarctica”), or smaller than a human being could pick up (“ant”, “quark”) are less likely to be simulated — though of course some of us have worked on extending the world model to include support for conversation topics, knowledge, and relationships.

Moreover, the choices you make about what to simulate will very heavily affect what kind of story you get out the other end. Finally, the way in which your simulation is described will affect how easily it can be plugged into a planner system.

I’d also warn against thinking of the content data as a minor aspect of the system. It’s common for research on story generation to focus on the process: is this grammar-based, is it a planner, is it partially ordered or not, are we forward-chaining or backward-chaining (or a little of each), are we planning the events of the story separately from the discourse layer, how are we measuring coherence and novelty (if those are even our concerns at all). Those are all interesting questions to ask, but the features of the content data also make a very significant difference to output quality, and a corpus implicitly encodes a lot of things about the possible story space that may not be inherently required by the generative method.

In every project I’ve worked on where there was a target output quality (as opposed to toy or experimental projects), most of my development time on a first release has gone into working and reworking the content data, rather than refining the process of generation. Once the qualities of a good data set are well understood, it’s possible to make additional data sets that conform to those expectations in significantly less time, and sometimes to support the process with tooling. But I tend to regard experiments in story generation to be fundamentally unfinished unless the experimenter also presents reasonably polished artifacts of their generative process. If they’re just describing a process and leaving high-quality artifact creation as an exercise for the future, then most of the work is (in my experience) still ahead of them.

So. That is the end of my speech. Now that we’re done with warnings:

Continue reading

Mailbag: Two letters about IF and language

This Mailbag post we have two related letters, and I don’t have a super-long answer to either, but I suspect readers may be interested and perhaps have their own comments to contribute:

Are you aware of any IF that has been produced in any endangered, minoritized, or indigenous languages? The only example I’ve come across is Harry Giles’ work in Scots: https://aitch-giles.itch.io/raik

I’m not very familiar with the IF world, and your site has been very educational. I’ve tried a few keyword searches to locate works that might not be in the IF databases, but found no other results.

IF would seem to be a useful format for sharing and learning underresourced languages. I’m currently working with folks in the Cherokee and Lakota communities on a handful of translation and localization projects, and I can’t imagine I’m the first to be exploring this area. I would be grateful for any insights. Thanks in advance for your time.

It would be fine to post my note, especially if you thought others might be interested. I’m writing a bit (and curating writing) about work in this area here: medium.com/r12n

— Derek Lackaff, Ph.D., Associate Director, Center for the Advancement of Teaching and Learning, Elon University

Continue reading

Mailbag: Applying Filters to Character Dialogue

The following letter fits right into this month’s topic on procedural generation. I’ve edited (just a little) for length:

Hi Emily! I read your chapter in the Procedural Generation in Game Design book, and was really impressed. I tried to follow up on some of the sources you mentioned (e.g. the Spy Feet game) but I wasn’t able to get a lot of details, and we have a pretty specific use case, so I’d love to beg a moment of your time to get me pointed in the right direction. Or, if answering my question properly takes more than a moment, I’d be happy to talk about a consulting fee…

We’re doing a bunch of what I’d call dynamic writing, which you can read more about here or on our wiki if you’re interested in the specifics. We have procedurally generated characters (heroes in a fantasy setting) with personality stats tied to their histories, and our system allows writers to take those personalities (and other details) into account in 2 main ways. The first is by picking who takes what role in any given story, (e.g. the highest goofball stat in the party might be picked to be telling the joke in a particular story) and the second way is by inserting markup in the text to add variations for specific personality traits (or relationship status, class, age, etc..) For example we can say things like, if the leader is more bookish, they’ll say something academic, but if they are more hothead, they’ll say something aggressive. This markup is also how we handle gendered words and attraction.

One of the things our game supports (due to the 2D art style and just the stories we want to tell) is really dramatic character transformations, like, to take a simple example, you might find a wolf shrine, and make a deal with the wolf god, and get your head replaced with a wolf head. Now you have a bite attack, cool. But it would be great if we could alter the character’s speech to reflect their condition. Likewise for other conditions or origin stories, or frankly (eventually, maybe) personality quirks.

Continue reading

Mailbag: Viewpoint for Cut-Scenes

I’m working on a Twine game with a similar storytelling style to the 1995 Lucasarts game Full Throttle. 

I noticed a storytelling element within the game, and I was wondering what type of story/narration the game could be considered to have. 

The game opens with the protagonist, Ben, saying a few lines that set the scene and set up the story. It almost sounds as if he’s telling the player a story. 

But then, the cutscenes involve events that Ben is not present for and may not logically know about. Examples, which involve spoilers, are: All events while Ben is passed out in a dumpster in the game opening, a lot of the hovercraft police officers dialogue, the murder of Malcolm Corley, Ripburger’s henchmen chasing down the reporter who photographed the murder and attempting to murder Maureen, and a few more, further into the story, that I’m missing. 

But the game also has the live element that comes with being a game, and it involves Ben’s narration and comments based on the action menu, as well as through conversations. 

I’ve been trying to figure out how this storytelling style would work within a text-only game. It seems like it could be a type of frame story? Many important details would be missed if the perspective stuck solely to Ben, as it’s also, in a way, the story of the other major characters in the story. 

I know I can’t perfectly translate it because while they have similar natures, they’re also significantly different styles of games. But I also feel that to capture the feel of FT, I should employ a similar writing style, which to me seems like a sort of framed, first person semi-omniscient type of thing. 

If you have any advice, I’d love to know!

This question feels like it’s asking several things at once:

  • Terminology. What do we call the viewpoint of a game that sometimes shows you things that the player character is not present to see, especially in the case that the player character is otherwise the narrator?
  • Canon. Are there other text-based games that do anything like this? How do they handle it?
  • Craft. How would one introduce these scenes in a way that feels natural, considering they don’t include the protagonist?

Continue reading

Not Exactly Mailbag: Worldbuilding from a Mechanic

Monkey graphicsTwice this year I’ve spoken about matching story and mechanics — once for the Oxford/London IF Meetup, and once as a keynote talk at the Malta Global Game Jam. Both times, I mentioned the idea of using mechanics as the basis of world-building. I’ve done this both with the letter-changing powers of Counterfeit Monkey and the Lavori d’Aracne sympathetic magic of Savoir-Faire and Damnatio Memoriae. (I’ll talk a bit about all of those games below, so beware moderate spoilers, if you care.)

In Malta, one of the questions I got after my talk was “how do I know what questions to ask when world-building?” and I suggested having a look at conventional fiction guides for world-building. It seemed like a fair response at a time, but as I’ve had a look at some of the world-building guides out there, I felt that most of them didn’t necessarily translate directly to the types of strategies I use for this cause. So I’ll belatedly go into a little more depth about that now, in the hope it’s useful to someone (whether or not ever seen by the original questioner).

If you’ve got mechanics, that typically means you’ve got

  • an action/set of actions for the player to perform
  • some kind of world state that is affected by those actions in some way

And that’s all we need to ask world-building questions.

Continue reading

Mailbag: IF Candidates for Porting

What IF story would be best for someone with limited time and resources to re-create as a 3D and even VR game? It would have to be under some license such as a Creative Commons license, where derivatives are allowed and preferably a license that allows commercial derivatives.

Before I answer this, I feel I’d be doing a disservice if I didn’t ask why you want to attempt this, and whether you’re sure you’ve thought it through.

Text adventures are good at evocative sense of place (and other events) on a budget; at allowing a huge palette of verbs; at geographical exploration and large game spaces; at (if desired) long play times, sometimes extending over months; at capturing a character’s interiority and viewpoint; at creating a very complicated world state that can offer persistent consequences for the player.

VR is good at intense, 10-20 minute experiences. VR works tend towards limited and simple controls, and require intense asset work for every setting. On many (especially budget) VR systems, they induce the least nausea if the protagonist doesn’t move around that much. Meanwhile, IF levels of world state in VR are a pain, because either that state isn’t visible (in which case, how does the player know?) or it is (in which case, you have to make variations on your assets in order to represent those state changes). Cut scenes and branching narrative outcomes, also cheap(ish) in text, may be very expensive in VR in that they may require animations or additional assets.

Not only that, but any game with a complex parser-based experience is going to be untenable: no one wants to type in VR; you could hook up voice-recognition but it’s likely to multiply the parser errors that are already irritating on the screen ordinarily. There are lots of great one-room IF games, from Rematch to Aisle, that rely heavily on the inventiveness of the player’s input. These would also be a poor match for VR in most instances.

Some similar things are true of 3D games in general, though less so. In a text adventure, you can write a randomized “[The character] is [one of]whistling a jaunty tune[or]staring out the window[or]playing solitaire[at random]” sentence, and you’ve just accomplished something that would take days of idle animation work in 3D.

So that raises the question of what you’re hoping to get by adapting a text game to a very much non-text medium, and whether it wouldn’t make more sense to come up with a new story suited to the affordances of your target medium. The best piece of advice I can offer here is just “don’t do this.” VR is really, really very much its own beast and even 3D console gameplay doesn’t always map at all well to that space.

But, okay. Let’s say that for some reason you don’t want to take the easier route and write a story customized to the storytelling possibilities of VR. What would be the least-awful IF game to port to VR, given minimal development resources?

Continue reading