Stories - Multi-User-Domain/vocab GitHub Wiki

Branching Linear Narratives

A branching linear narrative is a story which flows from present to future, but which permits the user to make choices which influence where the story goes

As part of the Multi-User-Domain project we've been experimenting with the extension of Ink to support a Games Commons. Ink is a simple but powerful programming language used to develop branching narratives. For more info check out the utopian-dialogue project

Modular Storytelling

The key difference to storytelling in a commons game than a regular game is that the story needs to be adaptive to an open context of possible worlds which might be using the story. It might be that the story is taking place in a fantasy Elven city, it might be taking place on a space-ship. Obviously, no story can be written to cover every context.

At some point individual decisions will need to update a world state in real time. For now, the focus of experiment is in injecting characters and context into stories written to adapt to them, and in constraining contexts to those which conform to the assumptions of the world. We're treating it so that a story requires a certain world context to exist, supported by a server which will select and generate from the world the story is being invoked in, where the story itself is short and modular, and outputs world state changes based on user choices which can then become the context for future story selection. The stories thus become modular

Shape Conformity

The process of restricting a world which invokes the story along a context is the process of creating a shape to describe the context of the world, and then defining it on the story Interaction. Adapt from the code below:

{
    "@context": {
        "muddialogue":"https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/muddialogue.ttl#",
        "n": "http://www.w3.org/2006/vcard/ns#"
    },
    "@id":"https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/examples/dialogueInteraction.json",
    "@type":"https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/muddialogue.ttl#Interaction",
    "muddialogue:inkFile":"https://calum.inrupt.net/public/utopian-dialogue/demoInteraction.ink.json",
    "muddialogue:hasBindings": [
        {
            "@id": "_:param_character_jsonld",
            "@type": "https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/muddialogue.ttl#InkVariableBinding",
            "muddialogue:inkVariableName": "param_character_jsonld",
            "muddialogue:bindingMadeToShape": "https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/shapes/mudfantasy/vampires.ttl#202304ParisVampire"
        }
    ],
    "muddialogue:generateNarrativeContextEndpoint": "https://api.realm.games.coop/ud/generateContext/"
}

Note that you can find a full example of an Interaction by clicking on this text

The key properties to follow are:

  • muddialogue:bindingMadeToShape made on each binding. Indicates the shape to follow for each input argument expected by the Ink dialogue linked in the property muddialogue:inkFile
  • muddialogue:generateNarrativeContextEndpoint. Indicates the endpoint where the context can be generated from a given world state. More on this below in the section "Feeding the generateNarrativeContextEndpoint"

Feeding the generateNarrativeContextEndpoint

A POST request should be sent to the endpoint, with the required parameters givenInteraction and givenWorld:

{
   "givenInteraction": {
       // ...
   },
   "givenWorld": {
       // ...
   }
}

The server will respond with the same structure; the given interaction containing the resolved bindings, and the new world state based on anything that was generated for the story