Learning Ink: Part 6: Gather Points and Labelled Options

InkLogo

 

Learning Ink

 

Ink is a scripting language for creating interactive fiction like choose-you-own-adventures and other vast, branching stories.


 

Ink uses the concept of flow to describe how a story moves through different options and across branching paths. Within a flow, Ink also uses the idea of a weave, a section of options and gather points, that connect to each other and serve as a faster shorthand than using knots and diverts.

 

Gather Points

1_Gather

Gather Points use the minus sign, -, and serve as their name suggests, they gather. They act as the thing to run after a set of choices to “gather” their weave back together. Instead of using knots and diverts to show short text strings by bouncing between them, gather points can quickly fold back into each other.

Labelled Options

2_LabelledOptions

Like knots, options can also be labelled. Like what was done with conditional choices, labelled options can work the same way. Code can check to see if an option has been chosen and react accordingly.

3_GatherAndOptions

While knots and stitches can be used to divert into new story sections, using a weave, with gather points and labelled options, code can be reduced in complexity.

GatherPointsLabelledOptions

GitHub Gist Version:


It was {~Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday}.
I was unsure about asking him out on a date.
CHAPTER 1: ASKING HIM OUT
-> Chapter_1
=== Chapter_1 ===
{&What should I do? | What if I didn't say anything? | Should I ask him out?}
+ [Did he even like guys?]
-> Chapter_1
* I should just do it!
I let it go for weeks. Finally, I asked him out.
CHAPTER 2: GETTING READY
Why hadn't I thought about what I was going to wear?
Here I am, 30 minutes before the date and I haven't picked out my clothes!
* (Look_Good) [Pick out something good.] I took some time and picked out something good.
* (Random_Clothes) [Don't bother.] I just grabbed some clothes off the floor and ran out.
Finally, I was ready.
CHAPTER 3: EATING DINNER
{Look_Good: "You look good!"}
{Random_Clothes: "Ready?"}
But I hadn't made dinner plans! And they we were, standing outside his apartment.
He turned to me. "What should we eat?"
-> Pizza_Choices
=== Pizza_Choices ===
* [Pizza?] He shook his head. "I don't like pizza."
-> Pizza_Choices
* [Salad?] "Not a salad."
-> Pizza_Choices
+ [Nothing?] {"We have to eat something!"|"Stop being silly!"}
-> Pizza_Choices
* [Sushi?] "Sushi sounds good!"
We walked to the local sushi place.
-> END