Learning Ink Script - Tutorial One
- Edwin McRae
I'm Edwin, a Narrative Designer, and I know how to write in Ink Script. Blah blah blah...that's all you really need to know about me for now. ;-)
This is Tutorial One of many to come. By the time you've completed the final tutorial, I'm hoping you'll be Ink Scripting to the level I was when I wrote the script for Metia Interactive's 'Guardian'. Need more incentive? It's the scripting language that Inkle created to make '80 Days' and the 'Sorcery!' series of apps.
Ink Script - Tutorial One
Hopefully you've already downloaded Inkle's 'Inky' editor for Ink Script. If not, here's the link. Scroll down to Downloads and then click on whichever version is going to work best for your computer.
Install Inky and now we're in business!
And for Tutorial One, let's start with something simple and juicy. Like a seedless grape, not one of those nasty oranges or mandarins that require messy peeling and all that.
Choices in Ink Script
That's what we're here for, right? Choices. The very definition of interactive fiction.
In this tutorial you're going to learn how to write a basic decision. And to do this, I'm going to give you some Script to literally copy from this post into your Inky editor. Now, to differentiate it from everything else in the post here, I'm going to write symbols like this "*"in bold and the text that's going to show up in this first little Ink story in italics. Don't worry, I'll explain the symbols as I go along.
Right, here's our first Script sample.
What did you want to be when you grew up?
To infinity and beyond!
Building our bright future, brain by brain.
* World Leader.
Just as long as you're doing it for us, not you.
* Tax Accountant.
A truly noble occupation that has saved many lives!
* None of the above.
Good on you. Forge your own path!
Copy and paste the above sample into Inky and see what it does. Over on the right there, in the window where Inky features its ‘live play’ feature, you should see that the question and answers have popped up. Click on one of the options, like Tax Accountant, and the answer should hopefully appear.
And our little story will end because of that ->END thing that I wrote in there. If I didn’t have that, Inky would throw up an error message like this…
“Line 5: ran out of content. Do you need a '-> DONE' or '-> END'?”
Inky’s actually really good about letting know what you’ve done wrong. ;-)
And I put * before all of the options to let Inky know that I want that text to be clickable, and to show any text that follows the option.
* = Option symbol
Tax Accountant = clickable text
A truly noble occupation that has saved many lives! = The text that shows up after clicking on Tax Accountant.
-> END = How Inky knows to stop the story before it glitches out.
To replay your story and select other options, just click on that double-back arrow in Inky’s top right corner.
Just as a backup, here’s a picture of what this Script should look like in Inky straight after you’ve pasted it in.
And here’s what you should see after clicking on Tax Accountant.
Fingers crossed that my Inky and your Inky are in agreement.
Okay, that’s probably enough for now!
Have a go at writing your own questions, options and answers, and I’ll see you soon in Tutorial Two where we’ll go deeper into making Choices. :-)
You will guide a Māori warrior woman, Māia, on an interactive science-fiction adventure where your decisions mean life or death for your courageous heroine!
About Edwin McRae
Edwin is a narrative consultant and mentor for the games industry.