Skip to reading
Text & Sierra-Style Adventures

17. Write the opening transcript

Edition 0.86.3.4

Build a complete text or graphical parser adventure with typed commands, inventory puzzles and press-to-walk controls.

Download PDFView illustrations

Set ta_lines to an array of strings. Keep the first description short enough to invite a command. You can use this opening:

Code example
[
  "THE LAST SIGNAL",
  "Station Yard\nA key lies by Morgan. A note hangs by the door. The cabin is north.",
  "Type HELP for commands."
]

This is a JSON array of three strings. The \n sequence inserts a line break inside the second entry. The screenshots use a slightly longer opening paragraph; either version gives the player the same starting facts.

Figure 9. The transcript is a saved Array variable. The reader displays its entries in order.

Each command adds a line beginning with >, then a reply. The controller keeps the latest 100 entries so the saved transcript does not grow forever. An entry may contain several printed lines.

Room descriptions in the controller are separate from the Scene Designer’s Description field. The built-in parser uses the scene description; the full controller uses describe_room(). Update both while the prototype and controller are being compared.

Page 20 of 68Permalink
Go to page