Tory Hoke

Essays, art, and comics of the unexpected

FOLLOW:

Twine in 10 Minutes: Write Interactive Fiction Today

More

Most Recent Posts

Day 1: An Overview

(Experience this as a TikTok.) “Play is the work of childhood.” – Jean Piaget “or children, play is serious learning.” – Mr. Rogers Adult learning is

Read More »

(This article originally appeared as a Luna Station Quarterly’s Chick on the Draw column, February 6, 2015)

Think IF might be fun, but don’t know where to start? Here’s how to get hooked in ten minutes.

1) Watch an introduction by Chris Klimas, the founder of Twine.

It’s about two minutes and will prime your brain. Anything that can be done in a web browser, you can do with Twine. ANYTHING. But we’ll begin at the beginning.

2) Take a look at your Twine 2.0 home page.

While Twine 1 was an app to download and install (for Windows or OSX), Twine 2 is a web app that runs right in your browser. Open it in a new tab.

If it’s your first time there, it’ll look like this:

Intro to Twine 2.0 - splash page

Hit the big green “+Story” button and create a new story.

twine_2_home_new_story

3) Take a look at the big blue Twine 2 workspace.

It should look about like this.

twine_2_workspace

Buttons do what you might guess. Hover over any of them, and a tooltip will explain.

twine_2_workspace_tooltip

For extra credit, click on the story title and take a look at the options.

twine_2_workspace_story_menu

We won’t use any of these right now, but it’s good to know they’re there.

4) Edit the “Untitled Passage.”

The little soft blue square is our first passage. In Twine, a passage is a unit of the story–kind of like a page is a unit of a book. To edit a passage, you can either double-click it OR hover over it and select the pencil icon.

twine_2_workspace_passage_options

The passage editor looks like this:

twine_2_edit_passage

There are instructions in the passage! They are true instructions. Write some text in your passage, and include a link to another passage. Links belong in double square brackets, so Twine knows they’re links.

For what it’s worth, you can the link after a word in your story:

Go to the [[cellar]]

Or name the link something else.

[[I went to the cellar.->Spooky Place]]

You can also rename the passage, though this isn’t required.

Here is our gripping tale so far:

twine_2_passage_editor_start

5) Close the passage, and see that Twine made new passages automatically.

twine_2_workspace_new_passages

Neat! You can also add a new passage by clicking the green “+Passage” button. You can delete a passage by hovering over it and clicking the “Trash” icon (or by hitting the good old “Delete” key.)

For fun, I’m going to edit the “prince” and “heel” passages, too.

twine_2_workspace_passages_updated

6) “Play” what you’ve got so far.

Hit the “Play” button. The story will build and open in a new tab.

twine_2_story_built

Click on a link and see where it goes!

7) Set a variable.

Let’s make a “trust” variable and change it depending on the reader’s choice.

In the “prince” passage, add this line of code:

(set: $trust to 10)

In the “heel” passage, add this line of code:

(set: $trust to 0)

It doesn’t matter where the line of code is within the passage. It will be run when the passage is displayed.

twine_2_passage_editor_variable

(It’s maybe good practice to set the variable to some default starting value at the beginning, and then update it as you go, but let’s not worry about that right now.)

8) Use that variable.

That “trust” variable should have an impact on our story. Let’s add a passage that uses it.

Add this link to both the “prince” and “heel” passages:

To think I wouldn't have met him if it weren't for Lord Coddish's [[funeral]].

Like so:

twine_2_passage_prince

And add this to a new “funeral” passage:

Reynaldo sat next to me during the service and I was sure
(if: $trust > 0)[I'd never met a man so dignified](else:)[he'd make off with my handbag].

Like so:

twine_2_passage_funeral

9) Hit “Play” again.

The story will rebuild in the same tab as before.

Now, if you choose “heel,” you arrive here:

twine_2_story_heel

You can also hit the “Bug” button to play the story in debug mode. This gives you more information if you run into trouble.

And that’s it! You’ve written a Twine story!

The official full documentation is here, and the forum is here. There are more story formats and controls and stylesheets and anything you could want to do. WELCOME TO THE RADDEST ADVENTURE.

EXTRA CREDIT

If you’re interested in interactive fiction and writing games in general, you might enjoy the Sorting Hat built by the Quinnspiracy. BE CAREFUL. You might find yourself writing a visual novel, or a platformer, or a puzzle game, or some other wonderful thing.

Share This:

Comics: Rare Words

Comics: Sneaky VFX

Comics: Pure Silliness