Skip to content

Example game types

These pages take eight kinds of game and show how Patter slots into each one: the dialogue problems that kind of game runs into, and how Patter solves them. They’re a starting point for planning, not a tutorial. Each problem links to the page that has the detail.

Patter is about dialogue: the lines, the choices, and the state that goes with them. In every kind of game it does the same three things.

  • It holds the writing. Scenes, lines, and choices, written in Patterpad and played by the same runtime on JavaScript, Unity, Unreal, and Godot.
  • It keeps the dialogue’s state. What’s been said, what the player picked, the flags and values the conversations set, and the variation lists that remember where they are.
  • It shares state with your game. The game reports what the dialogue needs to know, such as the time, the quest stage, or what the player is carrying, as @world properties. The dialogue reads them, and where you allow it, changes them, and your game acts on the change.

Everything else is your game’s. It shows the text, plays the audio, moves the camera, and runs every system of its own: the puzzles, the quests, the combat, the inventory, the simulation, and the saving. Patter never runs those. It reads their results, and the dialogue follows them.

Game Data is how the writing hands cues to the game: an expression on a line, a camera on a cutscene, a sound on a game event. The game reads them as each beat plays.

Storylet Studio is Patter’s sibling, built for storylets: pieces of story with a condition on the front, dealt to the player when they fit. You don’t need it. It earns its place when the game has to choose which scene comes next from a pool, as the world changes: tonight’s event, the next rumour, which character turns up. Storylet Studio picks the beat, and Patter performs it, with both reading the same game state (Running it with Patter shows how they join). Each page says whether it’s worth adding.

For a first story in a browser, Make an interactive story for the web builds a small player step by step.

  • Text built from fragments. Patter can run a text game, with simple values dropped into the text, but its unit is the dialogue line. If your game combines and generates its text from fragments, use Ink, which is built for that.
  • Multiplayer. None of Patter is designed or tested for more than one player. Why Patter has the rest of the list.

Each page has short script sketches, shown the way Patterpad shows them.

  • A line is CHARACTER: text.
  • A choice’s options start with >. An option’s own condition and flags follow it in brackets on the same line, as in > Who's J.M.? (if @patter.saw_initials), and decide whether it’s offered.
  • Other notes, on conditions, selectors, effects, jumps, and Game Data, are in brackets on lines of their own. A condition or selector comes before what it applies to. An effect, or a line’s Game Data, follows the beat it belongs to, indented under it.

Open source under the MIT licence, made by .