-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
130 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,107 @@ | ||
title: Start | ||
--- | ||
Hello, NZGDC! | ||
=== | ||
Welcome to Learn to Write Narrative Games with Yarn Spinner! | ||
In this session, we're going to learn how to work with the Yarn Spinner narrative tool. | ||
In Yarn Spinner, we write our interactive stories in nodes. | ||
Nodes start with a `title`, then a colon, and a name, then three `-`. | ||
And nodes end with three `=`. | ||
All the text you see here is in a node. | ||
Each separate line inside the node is called... a `line`. | ||
And Yarn Spinner deliveries each line, one by one, to some kind of view. | ||
When you want to get to another node, you use a jump command. | ||
To jump you use a jump command... \<<jump AnotherNode>> | ||
<<jump AnotherNode>> | ||
=== | ||
|
||
title: AnotherNode | ||
--- | ||
Now we're inside another node. | ||
Rather creatively, it's called AnotherNode. | ||
We're inside it now. | ||
We can jump again if we want to. | ||
Like this... | ||
<<jump YetAnotherNode>> | ||
=== | ||
|
||
title: YetAnotherNode | ||
--- | ||
And here we are, in yet another node! | ||
But how do we branch the story if we want to? | ||
We use options. | ||
Options mean your player can decide what happens next. | ||
Specifically, options let you show multiple potential lines.. | ||
...and allow the player to choose what happens next. | ||
Options are marked with the -> symbol. | ||
Like this... | ||
-> I'd like a poem about options. | ||
-> I'd prefer to keep learning Yarn Spinner. | ||
Of course, options that don't go anywhere aren't super helpful. | ||
To make options go somewhere, we pair them with jump commands. | ||
Like this... | ||
-> I'd still like a poem about options. | ||
<<jump PoemAboutOptions>> | ||
-> I'd still prefer to keep learning Yarn Spinner. | ||
<<jump KeepLearning>> | ||
This line will never be shown, probably. | ||
=== | ||
|
||
title: PoemAboutOptions | ||
--- | ||
Here's a (bad) poem about options... | ||
Pick this or pick that, | ||
Your story's where it's at, | ||
Yarn Spinner's pretty rad! | ||
Anyway, let's keep learning. | ||
<<jump KeepLearning>> | ||
=== | ||
|
||
title: KeepLearning | ||
--- | ||
We're going to keep learning now! | ||
Let's declare a variable... | ||
<<declare $name = "Bob">> | ||
{$name}: My name is {$name}. | ||
{$name}: Should I change it? | ||
-> Yes, change it to Reginald. | ||
<<set $name to "Reginald">> | ||
-> Yes, change it to Daisy. | ||
<<set $name to "Daisy">> | ||
-> No, keep it as it is. | ||
{$name}: Righto. | ||
Shall we continue? | ||
-> Yes. | ||
<<jump MoreLearning>> | ||
-> No, let's end. | ||
<<stop>> | ||
=== | ||
|
||
title: MoreLearning | ||
--- | ||
{$name}: Let's declare another variable... | ||
<<declare $money = 2 as number>> | ||
{$name}: So, it looks like you only have {$money} dollars? | ||
-> Yes, alas. | ||
{$name}: Ah, well. | ||
<<jump FinalLearning>> | ||
-> Give me more? | ||
{$name}: Hmm. | ||
{$name}: Fine. | ||
<<set $money to $money + 50>> | ||
{$name}: There you go. | ||
-> Oh nice, I've got {$money} dollars now! Thanks! | ||
{$name}: You're welcome. | ||
<<jump FinalLearning>> | ||
-> None of your business. | ||
{$name}: Okey dokey. | ||
<<jump FinalLearning>> | ||
=== | ||
|
||
title: FinalLearning | ||
--- | ||
{$name}: Anyway, we have to get moving. | ||
-> Can you do anything else useful? | ||
{$name}: Lots of things, but we don't have time for that now! | ||
-> What can I spend this money on? <<if $money > 2>> | ||
{$name}: Oh, nothing. Alas. | ||
{$name}: Well, goodbye! | ||
=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.002.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YarnSpinnerJS", "YarnSpinnerJS.csproj", "{A8741B09-F499-4985-9199-9A521FDA7D3C}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A8741B09-F499-4985-9199-9A521FDA7D3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A8741B09-F499-4985-9199-9A521FDA7D3C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A8741B09-F499-4985-9199-9A521FDA7D3C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A8741B09-F499-4985-9199-9A521FDA7D3C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B0395C34-11A2-47A5-A107-C7CB9C3B41AB} | ||
EndGlobalSection | ||
EndGlobal |