Home

Harlowe

Harlowe is a story format for Twine 2, the web-based tool used to create interactive fiction. It is designed to be beginner-friendly and emphasizes readability and quick authoring. Harlowe provides a domain-specific language built around macros that control the flow of a story, handle variables, and render content. Writers create passages and navigate between them through links or macros that display dynamic text.

The Harlowe language uses parentheses to invoke actions, with syntax that typically includes assignments, conditionals, and

Harlowe is one of several formats supported by Twine 2; others include SugarCube and Snowman. It is

Stories written in Harlowe are exported as HTML files for publishing on the web or sharing as

display
commands.
For
example,
the
common
pattern
(set:
$score
to
0)
assigns
a
value
to
a
story
variable,
while
(if:
$score
>
5)[Text
to
show]
displays
content
conditionally.
Variables
are
prefixed
with
a
dollar
sign
and
are
scoped
to
the
current
story.
Other
macros
cover
looping,
lists,
and
content
rendering,
enabling
authors
to
structure
narratives
without
extensive
programming
knowledge.
popular
in
educational
settings
and
among
beginners
due
to
its
approachable
syntax
and
integrated
editor
workflow.
Over
time,
Harlowe
has
evolved
to
offer
improved
variable
handling,
macro
composition,
and
customization
options
for
text
and
user
interface
elements,
while
maintaining
a
focus
on
clarity
and
accessibility.
standalone
documents.
Documentation
and
tutorials
maintained
by
the
Twine
community
provide
guidance
on
macro
usage,
story
design,
and
best
practices
for
interactive
storytelling.