Primitive
Collaborative Prompt-Based Narrative Systems
A Model for the Collective Authorship of Onchain Lore
Authors:
Agnes Cameron, Manus Nijhoff
Published:
May 14, 2024
Collaborators:
Agnes Cameron, Ed Fornieles, Manus Nijhoff, and Jacob Willemsma

The medium of onchain game design comes with a variety of affordances and constraints, among them a strong emphasis on collective decision-making. Exploring this affordance through a prototypical system, we present Sentences: an onchain collaborative worldbuilding tool structured around the primitive of an append-only branching narrative. Built using MUD, it provides a lightweight environment for collective narrative generation. Each new game of Sentences generates a new world which players then materialise by adding progressively to its lore.

Motivation

Within the space of Autonomous Worlds, a common task in the genesis of new projects is collective "worldbuilding" – the construction of a shared system of lore that determines players' experience of a world. This exercise is often informal and unstructured, but can also be supported by ordered prompts and exercises that help worldbuilders to shape the structure and coherence of their world.

These exercises are, in and of themselves, worlds. They structure a messaging system between the narrators, a set of rules which allows a narrative to flourish. This ruleset is the world, in that it creates a space of suspended reality for the genesis of new ideas. The choice of exercise will also necessarily influence the narrative that gets created – a set of questions will assume a space of potential answers; a prompt in one direction can preclude exploration in another.

Sentences, then, is a "world for worldbuilding"; a primitive sandbox for collaborative lore generation. It is necessarily sparse and constrained, intended as a laboratory for the testing of new ideas. There is no chat or contribution other than that which extends the narrative. In the world of Sentences, worlds are constructed linearly, but could branch in many directions from an initial seed.

Alt Text

Mechanics

Unless a world is already in progress, loading the Sentences client gives the player an option to generate a new world. Upon generation, the players are issued with a prompt, giving the players a single core mechanic from which to develop a narrative – examples might look like:

"The most important thing in this society is nature"

"This civilization is solely reliant on the horizontal"

"This group is built on money"

Once generated, the world is live, and writers have a set amount of time (we set this as 20 blocks, which progress with a regular tick) to propose new additions to the narrative. After the time is up, there is a second period where participants vote for their favourite proposal. Once the votes are counted, the favourite proposal is appended to the narrative, and the process begins again.

If no proposals are made within the time window, the world dies. This death is not absolute: the world simply joins other dead worlds in an archive. As all proposals and votes are onchain, all worlds contain the full history of possible directions as "dead" branches, representing a set of possible parallel universes.

Contracts

The state of the narrative is managed by two interlocking systems: one that manages generation of new narratives, and a second that handles timing, voting and the proposal of new additions to the narrative.

New stories are initialised with a sentence selected at random from a list of hard-coded prompts, encoded in the entry system FirstEntrySystem.sol. These prompts were generated using a simple replacement grammar script. In a future version, this script could also be replicated within the contract to provide a more diverse range of start points.

Once the story is initialised, this initial prompt is added to the chain and a new proposal period begins. This period lasts for n blocks (where each block ticks at approximately one second), and is defined by the periodEndsBlock variable, which is set on the active story at the start of each new proposal period.

During the proposal period, new entries to the narrative are suggested, and participants vote on their choice of extension. Both proposals and votes are handled by ProposalsSystem.sol, which validates the timings of these contributions against the periodEndsBlock variable. Each proposal made points to a "parent" (the proposal it responds to), with successful proposals forming a linked list.

At the end of the proposal period, votes on each proposal are counted. In the case of a tie, one proposal of the two is selected at random (in a future version, it would be interesting to consider this as a case which would instead spawn a branch). In the case that no proposals have been made, the story ends – it is archived, and the next action a player can take will be to spawn a new narrative.

Applications

We imagine Sentences functioning best in sessions of 10-50 participants, who may or may not know one another, gathered in the spirit of prototyping lore. For example: running an event on Discord, where the goal is to generate five new worlds within an hour.

By itself, Sentences is not particularly exciting – it is intended as a tool, rather than a compelling world in and of itself. As a modular component, however, the Sentences narrative generation mechanism could integrate well into a more richly textured role-playing game, weaving the fabric of the game as it goes along. The voting mechanism could also be used to support the inclusion of generative output amongst player-generated prompts.

A weakness of Sentences' current form is the specificity of the initial prompts. This is straightforward to change for a different deployment, but it would be interesting to expand the prompt-generation mechanism of the game to be more in line with the open-endedness of the narrative component.

Alternatives

The form of Sentences is inspired by text-based games, improv, lorecrafting and TTRPGs. Some particular references that we drew from when making this game include Max Kreminski's Epitaph, a fantasy narrative-generation game, and Kate Compton's Tracery replacement grammar tool. These projects make use of simple randomness and modularity to create complex branching narratives – in our case, we were interested in the potential for these primitives to be used in a collective scenario.

While Sentences was built with worldbuilding in mind, and is somewhat opinionated in that sense (namely: append-only narrative), one could also imagine it being used in other constrained collaborative writing scenarios (Twitch Writes My Master's Thesis?).

Extensions and future work

An obvious extension to Sentences would be the ability for whoever initialises a world to set particular rules about how new sentences are appended to the narrative. These could, for example, modify the voting system to require a quorum of players for the narrative to continue, or modify the timings of the voting to slow or hasten the development of narrative. In doing so, Sentences becomes not only a prototyping tool for worlds, but also for the constraints and conversation structures that generate a particular flavour of lore.

Another equally interesting direction of development would be the option to spawn parallel worlds from the "dead" branches of the current world. As a mechanic, this would likely be best implemented by spawning a new "new world" contract with a pointer to the older branch, instead of generating a new world entirely from scratch.


Primitives
Pixel-Based Digital Physics
Player-Scripted NPCs
Atomic Object Systems
Rule Production as Gameplay
Local-First Game Loops