A living world companion
A world instance is more than the story being played in it. It’s a cast with relationships, places with histories and storylines that move forward chapter by chapter. This recipe only reads, so it fits alongside any other experience: a companion app beside a game, a codex in your own client, or a dashboard that lets a writers’ room watch a world evolve.
Show the cast and places
Section titled “Show the cast and places”Read the game state once for a complete snapshot. Its world holds characters, items and locations. Each entity has a description, its locationId or containerId, and its relationships in sourceRelationships and targetRelationships:
{ "relationshipId": "4be4a3f2-5d8f-4c7e-9a43-0f6f3a3b1d10", "sourceId": "c1a8dd94-21d2-4b9c-a417-ed5cb1325cda", "targetId": "79a3af39-c171-4dfb-b51b-5a684f61525d", "type": "friend", "description": "Brindle grumbles about Mallow's errands and has never once refused to come along."}That’s enough for a cast list with a relationship map, and a list of places with who’s in each. To page through one kind of entity, list entities with type=character, type=item or type=location. For one entity’s full detail, including its storyHistory, get the entity.
Track storylines and objectives
Section titled “Track storylines and objectives”List storylines to show where each one stands. Every storyline has a status of active, completed or cancelled, and ordered beats. Each beat has a name, a teaser and a status:
open: it hasn’t happened yet.hit: a story fulfilled it, andfulfilledByStoryIdsays which.skipped: the storyline moved past it.
Stories carry their own objectives, each with what the character set out to do (objective) and how it turned out (outcome). Together, beats and objectives are what you’d map onto your own quest log, achievements or chapter select. Beats include upcoming chapters, so decide how much to reveal: a teaser for the next open beat, for example, and names only once they’re hit.
Show the rules of the world
Section titled “Show the rules of the world”Get the world rules for the setting, magic, technology and physics of the world, as the current story’s modifiers shape them. They make a good “about this world” panel.
Keep it up to date
Section titled “Keep it up to date”There’s no need to poll. Every operation that changes a story returns the new gameState along with its events, so if your companion runs beside your own client, refresh it from those responses. Events such as UPDATE_RELATIONSHIP, UPDATE_LOCATION, NEW_ENTITY and COMPLETE_OBJECTIVE tell you which part of the view changed.
If the companion runs on its own, read the game state when it opens and whenever the player returns to it.