Twine Workshop

24
Twine A great way to tell interactive stories

description

Reference slides from the Twine Workshop for CMP310.

Transcript of Twine Workshop

Page 1: Twine Workshop

Twine

A great way to tell interactive stories

Page 2: Twine Workshop

Download

http://gimcrackd.com/etc/src/

Page 3: Twine Workshop

Choose Your Own Adventure++

with macros!

Page 4: Twine Workshop

Passages

● A section of writing● A route

Twine passages are both

Page 5: Twine Workshop

Ye Olde Passage

Your feet are swollen.

Continue walking (turn to page 20)

Pass out (turn to page 42)

Page 6: Twine Workshop

Hyperlinks

Your feet are swollen.

● Continue walking

● Pass out

Page 7: Twine Workshop

Pass Out

You pass out, animals come by and lick you.

Page 8: Twine Workshop

Continue Walking

You keep walking, your feet begin to bleed.

Page 9: Twine Workshop

In Twine, we link like this

Open [[door]]

^--- goes to passage “door”

Open [[The Door|door]]

^--- goes to passage “door” displays The Door

Page 10: Twine Workshop

Formatting

italics //text//bold ‘‘text’’underline __text__

bullets *one*two

numbered #one#two

Page 11: Twine Workshop

Special Passages

StoryTitle

StorySubtitle

StoryAuthor

These don’t link to anything, they just float there in space when you’re in Twine.

Page 12: Twine Workshop

Story Formats

● Sugarcane - One passage at a time, hides the rest

● Jonah - Timeline of passages

Page 13: Twine Workshop

Forcing Choices

<<choice “Try to escape”>><<choice “Attack”>><<choice “Crap your pants”>>

When you do this, it will disable all the other choices in that passage.

Page 14: Twine Workshop

Reusing Text

<<display “Inn”>><<display “Drink”>>

Shows the passage Inn and Drink

Page 15: Twine Workshop

Actions

You see 2 fair maidens<<display “maidens actions”>>

In passage maidens actions…

<<actions “the blonde” “the brunette”>>

Page 16: Twine Workshop

Variables

$nameOfVariable

<<set $myVariable = “yes”>><<set $ammunition = 100>><<set $ammunition = $ammunition + 1>>

Page 17: Twine Workshop

Conditions

<<if $myVariable eq “yes”>>You have my variable!<<else>>You don’t have my variable<<endif>>

Page 18: Twine Workshop

Conditions

<<if $ammunition lt 1>>No more ammo!<<else>>You fire a shot<<set $ammunition = $ammunition - 1>><<endif>>

Page 19: Twine Workshop

Conditions

eq Equalneq Not Equalgt Greater Thangte Greater Than or Equal Tolt Less Thanlte Less Than or Equal To

Page 20: Twine Workshop

Multiple Conditions

andornot

<<if ($myVariable eq “Zanzibar”) and ($ammunition gt 1>>

<<if ($myVariable eq “Yellow”) or ($ammunition lt 100>>

Page 21: Twine Workshop

Silently

Every time a macro runs, it’ll use a line. You can remove those lines by encapsulating macros with<<silently>>

<<endsilently>>

Page 22: Twine Workshop

Images

[img[filename.png]]

[img[http://www.yahoo.com/image.png]]

Page 23: Twine Workshop

Publishing

● Build your story, save it as index.html● Upload index.html and any images into a

folder onto a web server