When you first start learning Yarn, you can use Try Yarn Spinner, our introductory, browser- based tool for writing Yarn Spinner Scripts. No installation necessary!
As you learn to write dialogue and game scripts with Yarn, you'll eventually need to use our editor, which is a Visual Studio Code Extension. Before you get to that stage, the best place to experiment with, and explore Yarn Spinner, is Try Yarn Spinner.
In Yarn, everything you write is text and structured around nodes and lines.
In Try Yarn Spinner, the first node to run is always called Start, so we’ll write that now.
In your own games or narratives outside of Try Yarn Spinner, the first node can be named whatever you like.
Copy and paste, or write, this Yarn Spinner script into Try Yarn Spinner, and hit the Run button in the top-right.
Check out the playable version of this Yarn Spinner script on the right-side of the screen.
We just wrote a simple Yarn Spinner script consisting of one node (titled Start
), with one line inside that node, delivering a greeting from a narrator.
The title of your nodes is important, because your game uses node titles to tell Yarn Spinner which node to start running. You also use the title of a node when you want to jump to another node, as you'll see soon.
Node titles are never shown to the player and must start with a letter, and can contain any letters, numbers and underscores (but cannot contain a period or other symbols)