Tool: Ink + Inky

Ink is an open source scripting language for narrative games

Official Page – check the basic and advanced tutorial!

Inky is the editor – download it!

Inkle is the company who made it – check their games!

Here’s a silly game example showing you the most common functions. You can copypaste it in Inky:

Next time we’ll integrate it with Unity.

//start here
-> introduction

Cheat sheet

=== free_store ===
marks a "knot", which is a dialogue, monologue, or cutscene accessible through in-game interaction. They are the entry point to any dialogues.

= objection_to_meeting
marks a "stitch", which is a storylet or a passage in twine terms

* [normal option] can be choosen only once
+ [sticky option] won't diappear (useful for navigation and interaction start/end)

+ [option]
    + + [nested option]

-> divert aka links to stitch or knot

//single line comment

TODO marks something as still unwritten passage

//choice conditioned to visited passage
* {neopagans_leave} [Choice]

//if / else
    do this
    do that


//I like to use allcaps for global variable to distinguish them from knots ids
VAR KEY = false

You are on campus and the game design class is starting soon. Also you didn't do your assignment. You can walk around freely.

//this passage is a placeholder for avatar movements on a level
+ [Go to CFA] -> CFA
//enable only after displaying the passage quest in paolo
+ {} [Go to the gym] -> level_up 
+ {not} [Go to the gym] -> gym
+ [Go to Warren Hall] -> warren_hall

//a simple key dependency using a global variable
You are in the College of Fine Arts.
+ [Talk to Paolo] -> paolo
+ {not KEY} [Get in the classroom] -> locked
+ {KEY} [Get in the classroom] -> unlocked
+ [Exit] -> main

//a choice conditioned by the int variable
Warren Hall is full of demonic administrators. They seem very dangerous, do you want to fight them?
//gameplay fight placeholder
+ {LEVEL < 3} [YES] -> lose
+ {LEVEL >= 3} [YES] -> win
+ [NO] -> main

//non repeated choices - choices can be followed by content or by diverts to other passages (knot)
== paolo ==
* [Say hello] -> intro
* {intro} [Missing homework] -> excuse
* {intro} [Offer help] -> quest
+ [Leave]
You: See you later.
Paolo: Ciao.

//this knot is under paolo, note the =
= intro
You: What's up Paolo!
Paolo: Nothing good, class is starting and I lost the key to 307.

//example of weak/expressive choice, both choices take you to the same spot.
= excuse
You: I'm sorry, I couldn't do the assignment because my laptop ran out of battery.
Paolo: Can't you just... buy a new laptop?
* [Too expensive] 
    You: Too expensive.
    Paolo: Dude, you are paying 1 million dollar to come to CMU.
* [Lie]
    You: The Apple store was flooded. //choice text doesn't have to be literal
    Paolo: I see, man made climate change.
//- (weave) is for linking back after a series of choices
- Paolo: Well, it doesn't matter anyway. If we can't get into 303 class is cancelled.

= quest
You: I really want to attend this class, is there anything I can do?
Paolo: Well you could defeat the demons of Warren Hall and get a new key.
-> paolo

//a links (diverts) can be used without player choices
== gym ==
You have no time to work out.

//increasing an int variable
== level_up ==
You work out super hard until you level up. Your current level is {LEVEL}.
- LEVEL < 3:
You are not ready to fight the administrators of Warren Hall.
- else:
You feel strong enough.

== lose ==
The admin demons slaughter you.

//moral choice with consequences
== win ==
You unsheat... unsheath... unsheathe your Tartan sword and slay the members of the board of trustees one by one. The one that is on Jeffrey Epstein's Black Book begs you for mercy.
*[Spare him] -> spare
*[Finish him] -> kill

== spare ==
You let the dude go. He earned a lesson and you are probably a good guy. Unfortunately, the key is nowhere to be found. You leave campus uneducated.

//changing a boolean variable
== kill ==
You decapitate the trustee, his demonic body dissolves, a golden key is dropped. It looks like the key to 303!
~KEY = true

== locked ==
You try to enter room 303 but the door is locked.

== unlocked ==
The door opens! You saved todays class. Paolo is very impressed and forgives you for your missing assignment.