{"id":439,"date":"2024-12-17T18:49:17","date_gmt":"2024-12-17T18:49:17","guid":{"rendered":"https:\/\/sites.wsagames.com\/et4g23\/?p=439"},"modified":"2024-12-17T18:49:17","modified_gmt":"2024-12-17T18:49:17","slug":"twine","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/","title":{"rendered":"Twine"},"content":{"rendered":"\n<p class=\"has-background\" style=\"background-color:#dfdfdf\">Twine is much more than just a glorified e-book. Although it is used to create stories, the experience of twine is a much more interactive one. Behind the simple passages and choices\/links between them, Twine is able to keep track of certain things using variables and code. Here, I will explain how these variables work and how I will use them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Boolean Variable<\/h2>\n\n\n\n<p>A &#8216;Boolean&#8217; is a variable that consists of one of two types, <strong>true <\/strong>or <strong>false<\/strong>. This is the most simple type of variable. For my Twine game, this can be used to keep track of many types of things; such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Do I have a certain type of key?<\/li>\n\n\n\n<li>Have I spoken to a certain NPC?<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"660\" height=\"1024\" src=\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-660x1024.png\" alt=\"\" class=\"wp-image-441\" style=\"width:235px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-660x1024.png 660w, https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-193x300.png 193w, https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-768x1191.png 768w, https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-300x465.png 300w, https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3.png 803w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/figure><\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>On the left are <strong>passages<\/strong>, essentially blocks in which the story will take place. Each of these passages have a &#8216;<strong>body<\/strong>&#8216;, within this body is what the player sees when they play the game; however, this is also where the code is implemented. These lines of code will not be visible to the player during gameplay; hence the rounded and square brackets. Between the square brackets is the code required to create links between passages. The grey arrows are how the player is able to <strong>navigate <\/strong>between these passages depending on the <strong>choices <\/strong>they make.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>Here, is the contents of each of the passages, with &#8216;Test&#8217; being at the top with &#8216;!hasKey&#8217; and &#8216;hasKey&#8217; following and finally &#8216;Locked Door&#8217; at the bottom (Unlock Door exists as Locked door has a link to it but it&#8217;s body is empty). The square brackets are the <strong>links <\/strong>between passages, with the text on the left being what the player will see, and the right being which passage the link will take them to. In the rounded brackets is; the code that sets and changes <strong>variables<\/strong>; and the <strong>conditional statements<\/strong> that check for the status of these variables.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"431\" height=\"410\" src=\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-4.png\" alt=\"\" class=\"wp-image-442\" srcset=\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-4.png 431w, https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-4-300x285.png 300w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><\/figure>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Twine is much more than just a glorified e-book. Although it is used to create stories, the experience of twine is a much more interactive one. Behind the simple passages and choices\/links between them, Twine is able to keep track of certain things using variables and code. Here, I will explain how these variables work&#8230;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-439","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Twine - E-Jay Tripoli (Year 2 Archive)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Twine - E-Jay Tripoli (Year 2 Archive)\" \/>\n<meta property=\"og:description\" content=\"Twine is much more than just a glorified e-book. Although it is used to create stories, the experience of twine is a much more interactive one. Behind the simple passages and choices\/links between them, Twine is able to keep track of certain things using variables and code. Here, I will explain how these variables work...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/\" \/>\n<meta property=\"og:site_name\" content=\"E-Jay Tripoli (Year 2 Archive)\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-17T18:49:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-660x1024.png\" \/>\n<meta name=\"author\" content=\"et4g23\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"et4g23\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/\",\"url\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/\",\"name\":\"Twine - E-Jay Tripoli (Year 2 Archive)\",\"isPartOf\":{\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-660x1024.png\",\"datePublished\":\"2024-12-17T18:49:17+00:00\",\"author\":{\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/#\/schema\/person\/56387a1dc0de878bb33ce4c478f22963\"},\"breadcrumb\":{\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#primaryimage\",\"url\":\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3.png\",\"contentUrl\":\"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3.png\",\"width\":803,\"height\":1245},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sites.wsagames.com\/et4g23\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Twine\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/#website\",\"url\":\"https:\/\/sites.wsagames.com\/et4g23\/\",\"name\":\"E-Jay Tripoli (Year 2 Archive)\",\"description\":\"A documentation of my work for Year 2 - Studying Games Design and Art at the University of Southampton\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sites.wsagames.com\/et4g23\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/#\/schema\/person\/56387a1dc0de878bb33ce4c478f22963\",\"name\":\"et4g23\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sites.wsagames.com\/et4g23\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/477d521b3b86e4ef27181bf784cd1a145a38c7d6a0154a478d3c858d26298bec?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/477d521b3b86e4ef27181bf784cd1a145a38c7d6a0154a478d3c858d26298bec?s=96&d=mm&r=g\",\"caption\":\"et4g23\"},\"url\":\"https:\/\/sites.wsagames.com\/et4g23\/author\/et4g23\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Twine - E-Jay Tripoli (Year 2 Archive)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/","og_locale":"en_US","og_type":"article","og_title":"Twine - E-Jay Tripoli (Year 2 Archive)","og_description":"Twine is much more than just a glorified e-book. Although it is used to create stories, the experience of twine is a much more interactive one. Behind the simple passages and choices\/links between them, Twine is able to keep track of certain things using variables and code. Here, I will explain how these variables work...","og_url":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/","og_site_name":"E-Jay Tripoli (Year 2 Archive)","article_published_time":"2024-12-17T18:49:17+00:00","og_image":[{"url":"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-660x1024.png","type":"","width":"","height":""}],"author":"et4g23","twitter_card":"summary_large_image","twitter_misc":{"Written by":"et4g23","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/","url":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/","name":"Twine - E-Jay Tripoli (Year 2 Archive)","isPartOf":{"@id":"https:\/\/sites.wsagames.com\/et4g23\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#primaryimage"},"image":{"@id":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#primaryimage"},"thumbnailUrl":"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3-660x1024.png","datePublished":"2024-12-17T18:49:17+00:00","author":{"@id":"https:\/\/sites.wsagames.com\/et4g23\/#\/schema\/person\/56387a1dc0de878bb33ce4c478f22963"},"breadcrumb":{"@id":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#primaryimage","url":"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3.png","contentUrl":"https:\/\/sites.wsagames.com\/et4g23\/wp-content\/uploads\/sites\/27\/2024\/12\/image-3.png","width":803,"height":1245},{"@type":"BreadcrumbList","@id":"https:\/\/sites.wsagames.com\/et4g23\/2024\/12\/17\/twine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sites.wsagames.com\/et4g23\/"},{"@type":"ListItem","position":2,"name":"Twine"}]},{"@type":"WebSite","@id":"https:\/\/sites.wsagames.com\/et4g23\/#website","url":"https:\/\/sites.wsagames.com\/et4g23\/","name":"E-Jay Tripoli (Year 2 Archive)","description":"A documentation of my work for Year 2 - Studying Games Design and Art at the University of Southampton","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sites.wsagames.com\/et4g23\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sites.wsagames.com\/et4g23\/#\/schema\/person\/56387a1dc0de878bb33ce4c478f22963","name":"et4g23","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sites.wsagames.com\/et4g23\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/477d521b3b86e4ef27181bf784cd1a145a38c7d6a0154a478d3c858d26298bec?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/477d521b3b86e4ef27181bf784cd1a145a38c7d6a0154a478d3c858d26298bec?s=96&d=mm&r=g","caption":"et4g23"},"url":"https:\/\/sites.wsagames.com\/et4g23\/author\/et4g23\/"}]}},"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/posts\/439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/comments?post=439"}],"version-history":[{"count":1,"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/posts\/439\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/posts\/439\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/media?parent=439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/categories?post=439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/et4g23\/wp-json\/wp\/v2\/tags?post=439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}