{"id":81,"date":"2024-01-27T15:02:39","date_gmt":"2024-01-27T15:02:39","guid":{"rendered":"http:\/\/mycours.es\/interactivity\/?page_id=81"},"modified":"2025-11-06T14:21:38","modified_gmt":"2025-11-06T14:21:38","slug":"ink-inky","status":"publish","type":"page","link":"https:\/\/mycours.es\/interactivity\/ink-inky\/","title":{"rendered":"Resources: Ink + Inky"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1607\" src=\"http:\/\/mycours.es\/gamedesign2021\/files\/2021\/09\/inky-screenshot@2x-1024x479.png\" alt=\"\" width=\"840\" height=\"393\" \/><\/p>\n<p>Ink is an open source scripting language for narrative games<\/p>\n<p><a href=\"https:\/\/www.inklestudios.com\/ink\/\">Official Page<\/a> &#8211; check the basic and advanced tutorial!<\/p>\n<p><a href=\"https:\/\/github.com\/inkle\/inky\/releases\/tag\/0.12.0\">Inky is the editor<\/a> &#8211; download it!<\/p>\n<p><a href=\"https:\/\/www.inklestudios.com\/\">Inkle<\/a> is the company who made it &#8211; check their games!<\/p>\n<p>Here&#8217;s a silly game example showing you the most common functions. You can copypaste it in Inky:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/start here\r\n-&gt; introduction\r\n\r\n\/*\r\nCheat sheet\r\n\r\n=== free_store ===\r\nmarks a \"knot\", which is a dialogue, monologue, or cutscene accessible through in-game interaction. They are the entry point to any dialogues.\r\n\r\n= objection_to_meeting\r\nmarks a \"stitch\", which is a storylet or a passage in twine terms\r\n\r\n* [normal option] can be choosen only once\r\n+ [sticky option] won't diappear (useful for navigation and interaction start\/end)\r\n\r\n+ [option]\r\n    + + [nested option]\r\n\r\n-&gt; divert aka links to stitch or knot\r\n\r\n\/\/single line comment\r\n\r\nTODO marks something as still unwritten passage\r\n\r\n\/\/choice conditioned to visited passage\r\n* {neopagans_leave} [Choice]\r\n\r\n\/\/if \/ else\r\n{\r\n-passage_title:\r\n    do this\r\n-VARIABLE_NAME &gt;= 2:\r\n    do that\r\n-else:\r\n    otherwise\r\n}\r\n\r\n*\/\r\n\r\n\/\/I like to use allcaps for global variable to distinguish them from knots ids\r\nVAR KEY = false\r\nVAR LEVEL = 0\r\n\r\n==introduction==\r\nYou are on campus and the game design class is starting soon. Also you didn't do your assignment. You can walk around freely.\r\n-&gt;main\r\n\r\n\/\/this passage is a placeholder for avatar movements on a level\r\n==main==\r\n+ [Go to CFA] -&gt; CFA\r\n\/\/enable only after displaying the passage quest in paolo\r\n+ {paolo.quest} [Go to the gym] -&gt; level_up \r\n+ {not paolo.quest} [Go to the gym] -&gt; gym\r\n+ [Go to Warren Hall] -&gt; warren_hall\r\n\r\n\/\/a simple key dependency using a global variable\r\n==CFA==\r\nYou are in the College of Fine Arts.\r\n+ [Talk to Paolo] -&gt; paolo\r\n+ {not KEY} [Get in the classroom] -&gt; locked\r\n+ {KEY} [Get in the classroom] -&gt; unlocked\r\n+ [Exit] -&gt; main\r\n\r\n\r\n\/\/a choice conditioned by the int variable\r\n==warren_hall==\r\nWarren Hall is full of demonic administrators. They seem very dangerous, do you want to fight them?\r\n\/\/gameplay fight placeholder\r\n+ {LEVEL &lt; 3} [YES] -&gt; lose\r\n+ {LEVEL &gt;= 3} [YES] -&gt; win\r\n+ [NO] -&gt; main\r\n\r\n\/\/non repeated choices - choices can be followed by content or by diverts to other passages (knot)\r\n== paolo ==\r\n* [Say hello] -&gt; intro\r\n* {intro} [Missing homework] -&gt; excuse\r\n* {intro} [Offer help] -&gt; quest\r\n+ [Leave]\r\nYou: See you later.\r\nPaolo: Ciao.\r\n-&gt;CFA\r\n\r\n\/\/this knot is under paolo, note the =\r\n= intro\r\nYou: What's up Paolo!\r\nPaolo: Nothing good, class is starting and I lost the key to 307.\r\n-&gt;paolo\r\n\r\n\/\/example of weak\/expressive choice, both choices take you to the same spot.\r\n= excuse\r\nYou: I'm sorry, I couldn't do the assignment because my laptop ran out of battery.\r\nPaolo: Can't you just... buy a new laptop?\r\n* [Too expensive] \r\n    You: Too expensive.\r\n    Paolo: Dude, you are paying 1 million dollar to come to CMU.\r\n* [Lie]\r\n    You: The Apple store was flooded. \/\/choice text doesn't have to be literal\r\n    Paolo: I see, man made climate change.\r\n\/\/- (weave) is for linking back after a series of choices\r\n- Paolo: Well, it doesn't matter anyway. If we can't get into 303 class is cancelled.\r\n-&gt;paolo\r\n\r\n= quest\r\nYou: I really want to attend this class, is there anything I can do?\r\nPaolo: Well you could defeat the demons of Warren Hall and get a new key.\r\n-&gt; paolo\r\n\r\n\/\/a links (diverts) can be used without player choices\r\n== gym ==\r\nYou have no time to work out.\r\n-&gt;main\r\n\r\n\/\/increasing an int variable\r\n== level_up ==\r\n~LEVEL+=1\r\nYou work out super hard until you level up. Your current level is {LEVEL}.\r\n{\r\n- LEVEL &lt; 3:\r\nYou are not ready to fight the administrators of Warren Hall.\r\n- else:\r\nYou feel strong enough.\r\n}\r\n-&gt;main\r\n\r\n== lose ==\r\nThe admin demons slaughter you.\r\nYOU DIED.\r\n-&gt;END\r\n\r\n\/\/moral choice with consequences\r\n== win ==\r\nYou 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.\r\n*[Spare him] -&gt; spare\r\n*[Finish him] -&gt; kill\r\n\r\n== spare ==\r\nYou 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.\r\nTHE END.\r\n-&gt;END\r\n\r\n\/\/changing a boolean variable\r\n== kill ==\r\nYou decapitate the trustee, his demonic body dissolves, a golden key is dropped. It looks like the key to 303!\r\n~KEY = true\r\n-&gt;main\r\n\r\n== locked ==\r\nYou try to enter room 303 but the door is locked.\r\n-&gt;CFA\r\n\r\n== unlocked ==\r\nThe door opens! You saved todays class. Paolo is very impressed and forgives you for your missing assignment.\r\nTHE END.\r\n-&gt;END\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ink is an open source scripting language for narrative games Official Page &#8211; check the basic and advanced tutorial! Inky is the editor &#8211; download it! Inkle is the company who made it &#8211; check their games! Here&#8217;s a silly game example showing you the most common functions. You can copypaste it in Inky: \/\/start &hellip; <a href=\"https:\/\/mycours.es\/interactivity\/ink-inky\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Resources: Ink + Inky&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-81","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/pages\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":2,"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/pages\/81\/revisions"}],"predecessor-version":[{"id":83,"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/pages\/81\/revisions\/83"}],"wp:attachment":[{"href":"https:\/\/mycours.es\/interactivity\/wp-json\/wp\/v2\/media?parent=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}