
Twine is an open-source tool for telling interactive, nonlinear stories - GordonS
https://twinery.org
======
thristian
For people who prefer the ol' text-editor-and-compiler workflow to a pretty
web-based tool, there's a command-line compiler for Twine stories called
Tweego[1]. It can compile a source file in the Twee v3 format[2] to a single
HTML file that includes the plain-text markup and the JS "story format" engine
that parses the markup, renders it to HTML, maintains state, etc.

Tweego comes with the same three default story formats that Twine comes with:
Harlowe[3], the basic default; Sugarcube[4], designed to provide a smooth
upgrade from Twine v1; and Snowman[5], designed to be extended with JavaScript
and CSS. I've dabbled a bit with Harlowe, and while it's flexible and
powerful, I found it a bit underwhelming as an actual markup language,
especially after growing used to Markdown.

If I ever write another Twine story, I'm going to try Chapbook[5], which is
actually based on Markdown, or maybe event try writing my own engine.

[1]: [https://www.motoslave.net/tweego/](https://www.motoslave.net/tweego/)

[2]: [https://github.com/iftechfoundation/twine-
specs/blob/master/...](https://github.com/iftechfoundation/twine-
specs/blob/master/twee-3-specification.md)

[3]: [https://twine2.neocities.org/](https://twine2.neocities.org/)

[4]:
[https://www.motoslave.net/sugarcube/2/docs/](https://www.motoslave.net/sugarcube/2/docs/)

[5]:
[https://klembot.github.io/chapbook/guide/](https://klembot.github.io/chapbook/guide/)

~~~
vidugavia
Chapbook looks nice, but even after first glance I see a lot of things
potentially missing, such as possibility to redirect to "death passage" from
each passage if health drops below zero. Maybe it will be developed in that
direction, but for now I feel Snowman should be a default choice for any
developer trying out Twine, because you basically code everything in JS.

------
cproctor
There's some argument that the limitations of this format (compared to open-
ended parser games, or the _very open-ended_ AI Dungeon posted here last week)
are a benefit. Ian Bogost's piece in the Atlantic a couple of years ago,
"Video Games are Better Without Stories" [1] argued that narrative in games
can't deliver on its promise--you can't craft a story while also letting the
player explore. To my taste, games like Inkle's 80 Days and Heaven's Vault,
and Nicky Case's games like the Coming Out Simulator [2], make effective use
of the constraints of the medium. They do feel more like literature than
games, which might feel overly conservative to folks primarily interested in
the phenomenological possibilities of games.

My project, Unfold Studio [3], makes use of the affordances of Inkle's Ink
language for teaching CS in the context of students' existing identities and
concerns. Here, the limitations of the format are again useful. Students can
create small playable worlds in a way that's still manageable and which makes
CS concepts rhetorically powerful--they are immediately useful for creating
particular experiences for the user. Here's an accessible piece [4] on how
this approach could support marginalized youth in developing criticality:
understanding and challenging unfair techno-social conditions.

I'm always looking for collaborators!

[1]
[https://www.theatlantic.com/technology/archive/2017/04/video...](https://www.theatlantic.com/technology/archive/2017/04/video-
games-stories/524148/) [2] [https://ncase.me/cos/](https://ncase.me/cos/) [3]
[https://unfold.studio](https://unfold.studio) [4]
[https://chrisproctor.net/publications/proctor_2019_voice.htm...](https://chrisproctor.net/publications/proctor_2019_voice.html)

~~~
aidenn0
> narrative in games can't deliver on its promise--you can't craft a story
> while also letting the player explore.

Roger Ebert made a similar argument[1] a while back.

While I agree that interactivity and narrative are in tension, I don't agree
that they are incompatible. There was plenty of exploration in Planetfall, but
also a very emotional scene. While many have argued that that scene should be
discounted because it's in a non-interactive portion of the game (e.g. [2]),
the impact of the scene exists because of the relationship that was built-up
with Floyd mostly through interactive moments and exploration.

In the realm of non-computer games, there are all sorts of highly interactive
story-telling games and RPGs, and while I think Ebert would claim that those
don't count because the narrative is accidental rather than intentional, I
find that to be a somewhat arbitrary distinction.

1: [https://www.rogerebert.com/rogers-journal/video-games-can-
ne...](https://www.rogerebert.com/rogers-journal/video-games-can-never-be-art)

2:
[https://web.archive.org/web/20081109044017/http://www.raphko...](https://web.archive.org/web/20081109044017/http://www.raphkoster.com/2005/12/07/the-
pixar-lesson/)

------
gladimdim
My friend and I used the Twine and then Inkle formats for our interactive
fiction game. But these formats produce unreadable JSONs and require custom
editors to edit them. Also, their libs for Java/Objective-C had a lot of bugs
:( And learning a new DSL to write a book takes too much time...

As a result we created a new interactive fiction format:

[https://github.com/gladimdim/GladStoriesEngine#human-
readabl...](https://github.com/gladimdim/GladStoriesEngine#human-readable-
json-data-structure)

It is already used by the
[https://locadeserta.com/index_en.html](https://locadeserta.com/index_en.html)

And it has a Dart implementation:
[https://pub.dev/packages/gladstoriesengine](https://pub.dev/packages/gladstoriesengine).
It can be used with Flutter apps in web and native!

~~~
bloopernova
As someone who played a lot of SCUMM adventure games "back in the day", I want
to applaud you!

~~~
scrollaway
Check out the Deponia series for a bit of modern scumm-like LucasArts
adventure games :)

~~~
bloopernova
My wife has played some of those! She's a huge fan of the point and click
adventures, I should see if her Steam library is sharing. Thank you for the
reminder :)

------
captn3m0
Cool Project Idea: Make a tool that converts Twine projects to those Twitter-
Adventure threads that got viral this year[0].

Last I'd checked, this was complicated by the state-feature (health/features
etc) in Twine. But for simple adventures, this should be doable.

[0]:
[https://twitter.com/CORNYASSBITCH/status/1142591156884127744](https://twitter.com/CORNYASSBITCH/status/1142591156884127744)

------
immigrantsheep
I like Twine but I ended up using Ink and Inky much more
[https://www.inklestudios.com/ink/](https://www.inklestudios.com/ink/)

~~~
gladimdim
Haha! We did the same with our interactive-fiction game. At first we started
with Twine but quickly switched to Inky format. But their libs for
Java/Objective-C are not very good so I had to create my own ports to it. In
the end we ended up with creating are own interactive fiction JSON format. All
editors can do JSON, you do not require a special software to do it (ASAIR
Inky required .NET SDK to be installed...)

------
parisidau
If you're interested in writing stories in a language like this, I've been
working on a project called Yarn Spinner
([https://github.com/YarnSpinnerTool/YarnSpinner](https://github.com/YarnSpinnerTool/YarnSpinner))
that basically implements a Twine-like system for dialogue in Unity. A few
indie games are using it - most notably, Night in the Woods
([https://nightinthewoods.com](https://nightinthewoods.com)). We're pretty
pleased with the results that people are getting from it.

~~~
phreack
Heh, I looked this up back in the day and thought how confusing it was that it
had the same name as the yarn package manager since I was using it in my build
process.

Does it have a way to export to JSON or another structured format? My game's
built by building a website from Twine exported to JSON with Twison and it's
not ideal.

~~~
parisidau
We can’t do that yet but we’d be interested in knowing what kind of structured
format you need? E.g., do you need the nodes? the lines? The structure of the
interconnecting nodes? something exotic like the parse tree? Let us know! We'd
love to help out.

Yarn Spinner predates the Yarn package manager by about 1 year!

~~~
phreack
My game is basically an interactive story told in chat format, so what I use
with Twison is a list of nodes and I use the node text content, the nodes it
points to, and a set of tags to organize which node correspond to which
conversation. I'm currently working on a way to set variables when entering a
node but that's all done 'client side'.

------
jordanpg
I want to like Twine games and stories, I really do.

I always find them underwhelming, though.

I can see how these might be of interest to a very young audience, in analogy
to the CYOA books of yore. But the appeal to a more mature audience, like the
appeal of parser games or really video games generally, escapes me. It's
always struck me as odd that these games are compared with traditional IF
parser games, because parser games (which have their own problems) seem to me
to be in another galaxy in terms of gameplay, scope, and complexity.

This is an example of how it's hard for me to even see the potential of the
platform. Does this ever get beyond clicking on words, with branching
storylines? Are there any examples of Twine games that get beyond simple
hypertext storytelling?

~~~
7thaccount
Agreed that these aren't as good as something like Blue Lacuna, but the
intended audience is probably different.

Kids like simple CYOA type books and are a natural fit, where games like Blue
Lacuna are a bit much. Likewise, some adults just want a simple a fun game
with no backtracking and complex puzzles. I played one of these for a few
hours on my phone once and it was indeed entertaining.

~~~
vanderZwan
It's also intended to be something that children can experiment with
themselves, and it's pretty good at that.

------
phrotoma
For the Black Mirror fans, Charlie talks about using Twine to help write
Bandersnatch in this interview: [https://www.wired.com/story/black-mirror-
bandersnatch-intera...](https://www.wired.com/story/black-mirror-bandersnatch-
interactive-episode/).

------
xchip
Another CYOA editor with a unique editor that shows you the whole conversation
graph

[https://aguaviva.github.io/SEMap/SEMap.html](https://aguaviva.github.io/SEMap/SEMap.html)

It was used to create this bot that asks you Socratic questions:

[https://aguaviva.github.io/SEMap/BeliefExplorer.html](https://aguaviva.github.io/SEMap/BeliefExplorer.html)

I hope this interests somebody one day!

------
quotemstr
I've been wondering why we don't apply modern NLP techniques to the
traditional parser-based interactive fiction format. In particular, part-of-
speech tagging ought to be _very_ robust by now, so we should be able to
handle sentences with complex relative clauses and homonyms pretty well now,
making the whole experience less frustrating.

~~~
curiousdannii
Various levels of NLP do get applied in IF, but it doesn't necessarily help
much. Being able to parse input is an important step, but the game/story needs
to be able to do something with those verbs and nouns. For a good player
experience the author needs to communicate clearly what range of input will be
acceptable, making sure all nouns mentioned in text can be interacted, any
actions implied in the text or by the nouns themselves are recognised, etc. If
you do that well then you can have a good player experience with a purely
handcoded parser.

------
Igelau
Interactive Fiction isn't a genre I'm well versed in, but Seedship by John
Ayliff stood out to me as particularly effective, and I know that was made
with Twine.

[http://philome.la/johnayliff/seedship/play](http://philome.la/johnayliff/seedship/play)

------
Rudism
I created a related set of tooling called Ficdown (ficdown.com) that lets you
write simple choice-based interactive stories using Markdown syntax (headings
to represent scenes, anchors to represent choices and variables, and so on).
My focus was on supporting the creation of stories that could be compiled into
static ebooks to be read on e-readers that wouldn't support systems requiring
a custom engine to run.

------
jccalhoun
The maintainer has a patreon that I support.
[https://www.patreon.com/klembot](https://www.patreon.com/klembot) I'm
impressed by how diligent he is with sending updates out to backers. He's
currently updating twine and I'm sure he would like some support.

------
Aperocky
It looks like we’ve ran out of names. I would tell you it’s the python package
uploader if you asked for twine

~~~
chipotle_coyote
To the best of my knowledge, Twine the game system predates Twine the Python
package publisher by several years. (The first release of the game system was
2009; the first release of the packager appears to have been 2013.)

------
webappguy
Looks cool reminds me of that tool might have been called bigboard or
something. Had a yellow logo got bout by a company starts with an 'm'. Anyone
recall? Just a giant whiteboard to pin things, create mind maps etc

------
jakequade
Firewatch devs used this for the intro - and it's beautiful. Nice work team.

------
failrate
Making Twine games is super fun and interesting. It has a mostly intuitive
programming language.

------
snvzz
Like ren'py, onscripter, kirikiri2 and so many others.

------
jmiskovic
How hackable is it? Can we write JS functions to generate procedural worlds?

------
melvinroest
I wrote my thesis on something similar [1, 2]. My thesis asked all kinds of
questions [4].

It was about XIMPEL which had a lot in common with SMIL (a former W3C
standard), mostly because they were developed by people who were a bit rivals
of each other. Here is a showcase of XIMPEL [3].

[1]
[https://melvinroest.github.io/ximpel/documentation/theses/ma...](https://melvinroest.github.io/ximpel/documentation/theses/master_thesis_melvin_roest.pdf)

[2] An introduction with some background context is here:
[https://melvinroest.github.io/ximpel/](https://melvinroest.github.io/ximpel/)

[3]
[https://www.ximpel.net/category/showcase/](https://www.ximpel.net/category/showcase/)

[4]

What happens when you introduce applications in non-linear storytelling?
Answer: you can recreate CodeCademy.com.

What happens when you allow for media to be played in parallel: you're opening
a can of worms that has a lot of implications on user experience and
architecture of non-linear stories. You'll see some of the implications later
on.

Is ReactJS suitable as a framework for non-linear storytelling compared to
vanillaJS? Answer: yes, because ReactJS is component-based, so the components
will be based on media items for which you can tell a story. I also think it's
possible to make story/content components.

How do you measure frustration in a non-linear story framework? Answer: you
could do it via the webcam if the user consents. Since mouse clicks and watch
time is not enough. Non-linear stories are not applications, but they can be
(in XIMPEL at least), when media is passively consumed, you need facial
expressions (and user consent).

Now that we have parallel media playing how to do time scrubbing? Answer: in
my thesis I outlined multiple options. The biggest question is: do you want to
have a time line or a time graph?

Now that we have parallel media playing does that mean that a subject point in
the story should be able to survive subject point in the story that comes
after it? If it makes sense, content-wise, then yes. If you wouldn't have
parallel media playback, this would not make sense. (ok, I'm butchering this
answer, can't summarize it well, you can always read my thesis ;-) [1])

Is XIMPEL Turing Complete? Answer: almost! If we allow for the user to
disambiguate certain issues, then yes. What helps a lot with this is that
XIMPEL allows the use of integer variables. And you can get very far with 2
integer variables, since you can represent 2 integer variables as 2 stacks,
and 2 stacks makes a tape. Where it fails with XIMPEL though is knowing which
story/subject point to jump to.

------
yori
Twine is also a package publishing tool[1] in Python. With growing number of
projects and tools it is inevitable that we are going to have more and more of
these name clashes. I wonder if we can arrive at a naming system for projects
to avoid such name clashes to improve the brand identity of these projects.

[1] [https://packaging.python.org/tutorials/packaging-
projects/#u...](https://packaging.python.org/tutorials/packaging-
projects/#uploading-the-distribution-archives)

~~~
benmarks
One could look to the rules around trademark. If two things share the same
name, but not the same market, they both keep the name. Humans can be relied
on to literally coordinate an offering using a mark and market.

