<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Giannis G. Georgiou on Medium]]></title>
        <description><![CDATA[Stories by Giannis G. Georgiou on Medium]]></description>
        <link>https://medium.com/@giannisg?source=rss-e8b6e3737f5a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*8S0WO-VI-H5zCy1yWhVLvQ.jpeg</url>
            <title>Stories by Giannis G. Georgiou on Medium</title>
            <link>https://medium.com/@giannisg?source=rss-e8b6e3737f5a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:54:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@giannisg/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Making a Point and Click Adventure in Arcweave and Godot — Part 4: Metadata]]></title>
            <link>https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-4-metadata-85b9e161c947?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/85b9e161c947</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 16:56:13 GMT</pubDate>
            <atom:updated>2023-03-02T16:56:13.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Screenshot from Arcweave’s design mode, where one of the elements includes a “title” component, analysed in the article." src="https://cdn-images-1.medium.com/max/1024/1*qg3ci5llCVd1dwUl80iwiw.png" /></figure><h3>Making a Point and Click Adventure in Arcweave and Godot — Part 4: Metadata</h3><h4>How we use Arcweave’s components to transfer information to the game engine</h4><p>In this project, we wanted to demonstrate the flexibility of Arcweave’s components, so we used them in two different ways:</p><ol><li>to get the <strong>starting element</strong> of any dialogue and</li><li>to <strong>pass metadata</strong> during an element’s rendering.</li></ol><p>We describe the first use in this series’ <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-2-starting-a-dialogue-e2f2252c595c">2nd article</a>. The second use is what we will be going through in this article.</p><h4>Necessary metadata</h4><p>Besides the elements’ content and arcscript’s logic, there is also the need to transfer other pieces of information to the game engine. For example:</p><ul><li>“the speaker of this line is Andreas.”</li><li>“the player and the NPC talk simultaneously.”</li><li>“this content must be displayed as a title.”</li><li>“the game ends here.”</li><li>“there is a short pause here.”</li><li>“after saying this line, the player exits the recently clicked door.”</li><li>“play a sound effect here.”</li><li>“add this item to the inventory.”</li></ul><figure><img alt="Screenshot from our game’s diagram in Arcweave, showing an element with the “overlap” component attached." src="https://cdn-images-1.medium.com/max/1024/1*krOZGbAOEKjMK2VeO6woAQ.png" /><figcaption>This two-headed dragon is our overlap component, used when we want an element’s content to be displayed simultaneously with that of the next.</figcaption></figure><p>We call these pieces of information <strong>metadata</strong>, since they are neither content nor game state. Needless to say, they are still very important.</p><p>To manage those, we associate them with custom-made types of components.</p><h3>Components</h3><h4>The component class</h4><p>The Arcweave plugin includes <strong>classes</strong> for the main Arcweave items: elements, boards, and components. Each of them gives us easy access to its members.</p><p>In the case of the component class, its variables and methods allow <strong>easy access</strong> to a component’s ID, name, cover, and list of attributes. For example, the following method looks up an attribute by name and returns it as a Dictionary:</p><pre>get_attribute_by_name(name)</pre><p>Since our game uses components a lot — to signify dialogue speakers, verb/object combinations, and other metadata — it calls get_attribute_by_name all the time.</p><h4>Component types</h4><p>In Arcweave, we can create components for <strong>any reusable entity</strong>, like characters, items, locations, spells… Anything our game needs.</p><p>In our game, to stay consistent and meaningful, we divided those components to <strong>specific types</strong>, so the game can tell what to do with each one. To assign types to a component, we created an attribute called type, which consistently appears in all our components.</p><p>The other consistent attribute in our game’s components is its <strong>object name</strong> or objectName. For example, our game contains 2 components of the type character, which are the player (objectName: you) and Andreas, the NPC (objectName: andreas). It also contains various components of the type item, like the Amstrad computer (objectName: amstrad), the adventure game scripts (objectName: gameScripts), or the generic, fallback object mentioned in the <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-2-starting-a-dialogue-e2f2252c595c">2nd part</a> of this article series (objectName: generic).</p><p>Furthermore, we have components that <strong>affect the dialogue flow</strong>, under the type dialogueFlow, like pause or overlapNext.</p><p>Finally, we also made an animation type, but didn&#39;t get around to using it; we decided to keep things simple regarding production and not bother with animating the player for anything other than walking.</p><p>You can see a full list of our components, their types, and object names, in <a href="https://github.com/Arcweave/arcweave-godot-adventure-example#component-types">our game’s repository</a>.</p><h3>Getting components at runtime</h3><h4>The routine</h4><p>As the game follows the Arcweave project’s flow, it renders one element after another, waiting for the user’s input (if there are options) or a timer’s timeout (if there are not) in between. When it reaches an element (the “current element”), not only does it get its <strong>content</strong> (as we discussed in the previous part of this series), but it also <strong>iterates the attached components</strong> and <strong>classifies them</strong>, based on their type. Depending on the types of components found, the game runs various routines.</p><p>For example, the routines for dialogueFlow components are executed before the handling of the current content. This way, a pause or overlapNext component are taken into consideration, changing the default behaviour of rendering the content. In the case of pause, a short pause is inserted before the content&#39;s rendering, while in that of overlapNext, the content is not rendered but stored, to be displayed simultaneously with that of the next element.</p><p>You can study the whole function render_element(), which is responsible for diverting to component classification and handling of the various routines, in the <a href="https://github.com/Arcweave/arcweave-godot-adventure-example#rendering-an-element">readme file</a> of the project&#39;s git repository. For the sake of this article, though, we can go through the simple example of rendering a title.</p><h4>Rendering content as a title: an example</h4><p>Our game’s <strong>default behaviour</strong> of rendering an element’s content is to pair it with one (or more) speaker component(s), so it be delivered as <strong>dialogue</strong> lines of one or more characters.</p><p>An exception to that is the use of the title component (type: dialogueFlow, objectName: title). If the current element has such a component attached to it, <strong>the game renders the line as a title</strong>, with a bigger font and centered on the screen.</p><figure><img alt="Screenshot from our game, where a title is displayed, during a dialogue with the NPC. The title says “SOME HARD INNER WORK AND YEARS OF THERAPY LATER…”" src="https://cdn-images-1.medium.com/max/1024/1*l_OqAE4qZKmbTdCTYE_lFQ.png" /><figcaption>One of the game’s titles. Like a voice-over in a movie, a title can add an extra layer of narrative, which in our game is used purely for comedic effect.</figcaption></figure><h3>Conclusion &amp; takeaways</h3><p>Compared to other systems we have worked with, Arcweave’s components offer an <strong>easy</strong> and <strong>visual way to assign metadata</strong> to the story’s current content.</p><p>The need for component “types” seems to be screaming for implementation of component <strong>templates</strong> and/or <strong>classes</strong>, in Arcweave. Our team is aware of this need for quite a while and its implementation is in the top 5 of our priorities’ list.</p><p>Another need is for <strong>better management</strong> of that long list of <strong>global variables</strong>.</p><figure><img alt="Screenshot from Arcweave: the list of global variables is open, displaying more than 16 variables — this is how many fit in the screen." src="https://cdn-images-1.medium.com/max/1024/1*BrNHvBUsWsYHijAd06VUJQ.png" /><figcaption>Even in a short game like ours, the list of variables can get too long too soon.</figcaption></figure><p>One solution could be to implement <strong>a folder system</strong> (e.g. create a separate folder for all inventory-related variables — like i_amstrad, i_magazines, and i_gameScripts—and another one for dialogue, topic-related variables—like t_amstrad, t_magazines, and t_gameScripts). Another solution could be creating <strong>component variables</strong>, so e.g. the Amstrad component would then have amstrad.topic and amstrad.inventory to deal with. This is another issue our team is looking forward to solve in the near future.</p><p>Despite the above inconveniences, the overall feeling is that <strong>Arcweave served us really well</strong> in the creation of a short point and click game, not only as far as the <strong>dialogue trees</strong> go, but covering every aspect of the <strong>game’s puzzles and logic</strong>.</p><p>The <strong>Godot plugin</strong> took all the weight of dialogue and logic-handling off the developer’s shoulders, while the <strong>web API</strong> (mentioned in this series’s <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-1-first-prototype-b4d4039e83e0">first part</a>) made it extremely easy to fetch story updates into the engine.</p><p>Well, this is the last part of this series of articles. Congratulations for making it all the way to here! We hope our short demo has whetted your appetite to <strong>write your own amazing games</strong>! Go ahead — try the new Arcweave plugin for Godot and let us know what you think!</p><figure><img alt="Screenshot from our game. The player character, a brown-haired man in blue jeans, purple t-shirt, and orange shirt, stands in a room of cyan colour, saying: “I hope your game turns out better than this one.”" src="https://cdn-images-1.medium.com/max/1024/1*4o42P7JWZaw_UFu1hp9hHw.png" /><figcaption>Our PC always has a kind word for our users.</figcaption></figure><p>And if you are not a Godot person, stay put: <strong>new plugins</strong> are coming this year, for <strong>Unity</strong> and <strong>Unreal</strong>!</p><p>Hmm… We’d better start writing demos for those babies, as well…</p><p>You can find the Arcweave plugin for Godot at its <a href="https://github.com/Arcweave/arcweave-godot-plugin">repository</a> (with documentation) or the <a href="https://godotengine.org/asset-library/asset/1601">Godot Asset Library</a>.</p><p>Play our point and click adventure demo <em>Regrets</em> on its <a href="https://arcweave.itch.io/regrets">itch.io page</a> and download its source from its own <a href="https://github.com/Arcweave/arcweave-godot-adventure-example">repository</a>.</p><p>For a simpler demo, why not try our <a href="https://github.com/Arcweave/arcweave-godot-playmode-example">Play Mode at Godot</a>, which implements Arcweave’s play mode in a simple Godot project.</p><p>Finally, watch our <a href="https://www.youtube.com/watch?v=z4n4lu5ARa0&amp;list=PLP2s5PcDiBdZq5IW7NmU3kuL_7WSm8cXM&amp;index=1">Arcweave Integrations Series</a> on YouTube, for a taste of how the plugin works.</p><p>And, of course, always… <em>Let the games begin!</em></p><p><a href="https://medium.com/u/e8b6e3737f5a">Giannis</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is narrative director in <a href="https://arcweave.com/">Arcweave</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85b9e161c947" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making a Point and Click Adventure in Arcweave and Godot — Part 3: Logic and State]]></title>
            <link>https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-3-logic-and-state-78bae82ff0d1?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/78bae82ff0d1</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[games]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 14:47:29 GMT</pubDate>
            <atom:updated>2023-03-02T16:57:24.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukpSwGtQS85PXsIwZ-7a8g.png" /></figure><h3>Making a Point and Click Adventure in Arcweave and Godot — Part 3: Logic and State</h3><h4>How the Arcweave plugin transfers story variables and logic into the Godot game engine</h4><h3>A logical gap</h3><p>This series <a href="https://medium.com/@giannisg/making-a-point-and-click-adventure-in-arcweave-and-godot-part-1-first-prototype-b4d4039e83e0">begins</a> with our first efforts to make a game <strong>written in Arcweave and developed in Godot</strong>. In the <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-2-starting-a-dialogue-e2f2252c595c">second part</a>, we talk about our quest for a visual and friendly way of marking each dialogue’s starting element, so the <strong>player’s actions lead to game responses</strong>.</p><p>What happens with dialogue including <strong>dynamic content</strong>, though? What if the dialogue flow changes, depending on the <strong>game state</strong> (i.e. the value of a variable)?</p><p>In other words, <em>how do we get the story logic across to the game engine?</em></p><p>Arcweave applies logic in two ways: in branches and within elements. In both cases, we control logic with <strong>arcscript</strong>, the app’s simple scripting language.</p><h4>Logic in branches</h4><p>Arcweave has an object called <strong>branch</strong>, which evaluates conditions and diverts or stops the flow according to the result. For a branch to work, it must have an “if” condition. It may optionally have “else if” conditions and one “else” condition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcJ-bt3l7M0_zV2_6syT6g.png" /><figcaption>Two branches with “if” conditions. If the conditions evaluate to false, the outputs do not generate player options and the flow cannot follow them.</figcaption></figure><h4>Logic inside element content</h4><p>Besides branches, Arcweave also accepts logic within an element’s content. This can mean variable checks and assignments, as in this example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5G-ErX4dgk7PWnV8w1J-jQ.png" /><figcaption>We can include “if,” “elseif,” and “else” statements in an element’s content, as well as variable assignments.</figcaption></figure><p>Or it can mean checks triggering the rendering of different content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYeLNf808pMRCqCgTEfQCw.png" /><figcaption>Part of the… minigame included, where element content is dynamic. The “roll()” function generates a random number, while “show()” renders its arguments as text.</figcaption></figure><h3>Transferring content and logic alike</h3><h4>The Story class</h4><p>In the <a href="https://medium.com/@giannisg/making-a-point-and-click-adventure-in-arcweave-and-godot-part-1-first-prototype-b4d4039e83e0">first part</a> of this article series, we mentioned the problem of transferring the logic and how it resulted in the evolution of the Arcweave plugin for Godot. It is now time to get into the specifics of that.</p><p>The Arcweave plugin has a Story class, of which the methods allow direct access to the story variables, the current element, its content (static or dynamic), its attached components, and its valid options (again, as a result of in-branch logic).</p><pre>var story = Story.new()<br>story.get_state()<br>story.get_current_element()<br>story.get_current_element().components<br>story.get_current_content()<br>story.get_current_options()</pre><h4>Evaluating arcscript expressions</h4><p>We said the get_current_options() method returns <em>valid</em> options, because options dependent on game state will only appear if a branch condition is true.</p><p>In the same way, the get_current_content() method returns the current element&#39;s content, after evaluating whatever arcscript expressions it may contain.</p><p>So, the plugin saves us from the headache of parsing and evaluating Arcweave’s scripts and functions. Each of the above methods simply returns what we want.</p><h4>Accessing story variables directly</h4><p>The get_state() method returns all the story variables and their current values. These exist in the state_export.gd, one of the two files exported from Arcweave (the other being data_export.gd, which roughly said contains the project&#39;s whole content).</p><h4>A note on dialogue flow</h4><p>In the <a href="https://medium.com/LINK">previous article</a>, we described the process of getting a dialogue tree’s <strong>starting element</strong>. To run a dialogue, we set the relevant element as current:</p><pre>story.set_current_element(element_id)</pre><p>… and then fetch its content and components, using the methods mentioned further above.</p><p>The element’s content gets rendered according to the directives set by its metadata. (More on how our game’s components work as meta-data carriers, in the next installment of this series.) You can find a detailed analysis of the dialogue routine on the game’s <a href="https://github.com/Arcweave/arcweave-godot-adventure-example#rendering-an-element">repository</a>.</p><h3>Dialogue bottlenecks: an application of logic</h3><p>Our game includes an NPC. Every time you talk to him, you pick up the conversation from where you have left it (which is a standard for adventure games and what you would expect from any reasonable game world).</p><p>Obviously, this requires the application of logic. The dialogue tree includes <strong>variable assignments and checks</strong>. Each time your dialogue with the NPC reaches a milestone, a variable’s value increments. The next time you make conversation, a branch sends you to that milestone and you continue from there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wweVOTmmIoSqnGAA2jfkHg.png" /><figcaption>Shortly after the dialogue’s beginning, Arcweave’s branches take over, ready to divert the flow to the correct milestone.</figcaption></figure><p>Due to the fact that those milestones also work as <strong>bottlenecks</strong> for the dialogue tree (thus gathering branching flows back to one node), we used that name.</p><p>Our bottlenecks are also used to <strong>create loops in dialogue options</strong>. After the player picks a dialogue option and the flow follows the branch of its respective response, it can then send the flow back to that same bottleneck, for the player to pick another option (with the previously followed choice still present or now omitted).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BDYCxFeLtiNtIwYRJCh1Xw.png" /><figcaption>An example of a small loop in the dialogue. Once chosen, the “Who are you?” option diverts the flow along the yellow arrow and, once done, a jumper sends it back to “Bottleneck 1,” for the player to choose a different option.</figcaption></figure><p>In a nutshell, the game developer does not need to do extra work to transfer the logic and content from the Arcweave project to the game. The plugin does all the necessary evaluations and offers the results on a plate, for the dev to use as they wish.</p><p>In the <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-4-metadata-85b9e161c947">4th and final part</a> of this series, we will discuss how Arcweave’s components serve as our game’s metadata carriers.</p><p>Until then, you can find our plugin for Godot at its <a href="https://github.com/Arcweave/arcweave-godot-plugin">repository</a> (with documentation) or the <a href="https://godotengine.org/asset-library/asset/1601">Godot Asset Library</a>.</p><p>Play our point and click adventure demo <em>Regrets</em> on its <a href="https://arcweave.itch.io/regrets">itch.io page</a> and download its source from its own <a href="https://github.com/Arcweave/arcweave-godot-adventure-example">repository</a>.</p><p>For a simpler demo, why not try our <a href="https://github.com/Arcweave/arcweave-godot-playmode-example">Play Mode at Godot</a>, which implements Arcweave’s play mode in a simple Godot project.</p><p>Finally, watch our <a href="https://www.youtube.com/watch?v=z4n4lu5ARa0&amp;list=PLP2s5PcDiBdZq5IW7NmU3kuL_7WSm8cXM&amp;index=1">Arcweave Integrations Series</a> on YouTube, for a taste of how the plugin works.</p><p>And, of course, always… <em>Let the games begin!</em></p><p><a href="https://giannisg.medium.com/">Giannis</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is narrative director in <a href="https://arcweave.com/">Arcweave</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78bae82ff0d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making a Point and Click Adventure in Arcweave and Godot — Part 2: Starting a Dialogue]]></title>
            <link>https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-2-starting-a-dialogue-e2f2252c595c?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2f2252c595c</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[interactive]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[game-design]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Mon, 20 Feb 2023 11:57:45 GMT</pubDate>
            <atom:updated>2023-02-24T14:50:21.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6dPWErTRhNsKjaJNepWCQ.png" /></figure><h3>Making a Point and Click Adventure in Arcweave and Godot — Part 2: Starting a Dialogue</h3><h4>How the Arcweave plugin for Godot finds the right response for every player action</h4><p>In the <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-1-first-prototype-b4d4039e83e0">previous part</a> of this series, we talked about our first efforts to create a game written in Arcweave and developed in Godot, as well as our thinking process that formed the plugin facilitating this integration.</p><p>In this post, we will see how we dealt with fetching the starting element for a dialogue sequence.</p><h4>It all starts somewhere</h4><p>From our early prototype, we wanted to find a system for the game engine to look for each <strong>dialogue’s starting point</strong>. We deliberately created two dialogue trees, one with a dragon (mentioned in the previous article) and one with a necromancer, and looked for ways the engine would pick one or the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*xg_deKdN1djLCKOac-jyPQ.gif" /><figcaption>You can’t beat a silly encounter with a necromancer.</figcaption></figure><p>An Arcweave project provides an overall <strong>starting element</strong>, but this is useless for genres not incorporating the choose-your-path logic. In an open world game or a point and click adventure, there is <strong>no specific flow</strong>; instead, the player interacts with game world objects in any possible order.</p><p>In our point and click adventure, when the player clicks on items or characters, the mouse menu opens offering 3 options: <strong>EXAMINE</strong>, <strong>HANDLE</strong>, and <strong>TALK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*jkyVzVel0HLwJ6thPtDu3A.gif" /><figcaption>The game’s mouse menu in action.</figcaption></figure><p>For the game to know which dialogue element it is supposed to call, we needed a way to associate the action (e.g. EXAMINE) with the object clicked (e.g. GRAND PIANO).</p><h3>Iterating element titles</h3><p>The first idea that came to mind was to <strong>use the element title</strong> as some identity the game engine can look for. For the above dialogue with Bob the Necromancer, the engine was supposed to iterate the Arcweave project’s elements, looking for the one titled necromancerDialogue.dialogueStart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mrhi3W0fZiSQk0Yg6YCenw.png" /><figcaption>The starting element with the always cumbersome title was not to be rendered; only to signify the dialogue’s beginning. (Plus, some other silly things, like feeding the game engine in advance with the speakers and backdrop assets at play, something we fortunately got rid of a little bit later.)</figcaption></figure><p>If there were to be more dialogues, the engine would look for their respective starting elements, again by reading through their titles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5tg2fXM4ht0dcwMyjcuLKQ.png" /><figcaption>In the Godot script, for the sake of testing, we passed the element’s title as a constant.</figcaption></figure><p>When working on the point and click adventure, we started with the same logic. We had an element for every verb/object combination, with titles following a strict protocol, like amstrad.examine, amstrad.handle, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cp5HWPejm1zeqo-EzR9DPw.png" /><figcaption>Behold the Annual Gathering of Cumbersome Element Titles.</figcaption></figure><p>This system worked, but it always <strong>felt like a workaround</strong>; like missing a simpler and more sustainable solution.</p><h3>Using components</h3><p>We knew we had to move on from the above method.</p><p>It was <strong>fragile</strong> and <strong>unforgiving</strong>: all it took to break was a typo in an element’s title and the engine would miss an entire dialogue tree and throw an error.</p><p>It also <strong>worked against Arcweave’s visual approach</strong>: the writer had to look for words in titles, instead of something more eye-catching.</p><p>Moreover, we had made no use of Arcweave’s <strong>components</strong>, a flexible item with a million household uses. And it was indeed components that offered an easy and intuitive solution to the problem.</p><h4>Verb and object components</h4><p>Getting back to the <strong>EXAMINE GRAND PIANO</strong> example, all we needed was to create a component for the action verb <strong>EXAMINE</strong> and another one for the object <strong>PIANO</strong>. The starting element for the specific action would be the one having both components as its attachments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W0BsZlA75PJYs5Gyn259zw.png" /><figcaption>Yep, elements still have titles, but the game engine ignores them. All it cares about is which components elements have attached to them.</figcaption></figure><p>In fact, we created a component for each action verb (EXAMINE, HANDLE, WALK, and TALK) and one for each item / character that the player can interact with. Moreover, we gave all components some standard attributes: <strong>type</strong> and <strong>objectName</strong>, so the engine knows what kind of component they are.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E6VXpEfXrI4qHAjkW251Kw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W0PTz310o4EB64vJ641EuA.png" /></figure><h4>The Element class</h4><p>The Arcweave plugin includes <strong>classes</strong> for the main Arcweave items: elements, boards, and components. Each of them gives us easy access to its members.</p><p>An <strong>element</strong> grants us access to its own members: its ID, title, theme, outputs, components, attributes, and cover. And, of course, its content, a result of evaluations performed under the hood by the plugin.</p><p>Therefore, accessing an element’s attached components is easy, using the object.property syntax:</p><pre>var my_components : Array = my_element.components</pre><h4>Iterating elements and their components</h4><p>After each player action (e.g. EXAMINE GRAND PIANO), the game iterates through the Arcweave project’s elements, looking for the one having 2 attached components: the <strong>action verb component</strong> (type actionVerb—here: EXAMINE) and the <strong>item</strong> one (type item—here: PIANO). (If it finds more than 1, it throws a &quot;writer error,&quot; so the dev can inform the Arcweave writer to go and fix that, in their project.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dY2ArBq7GE5OFpwk-hir8A.png" /><figcaption>An example where a “writer error” is thrown; some cases require only one element to exist, like the starting element for a specific action. Otherwise, where would the dialogue start? This function includes the problematic element IDs in the error message, for the writer to locate and fix in the Arcweave project.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fdEDKOviATviaDw-reNrcw.png" /><figcaption>It helps to differentiate errors and warnings to be dealt by the dev and those to be dealt by the Arcweave writer.</figcaption></figure><p>Once found, this element is set as current and the dialogue begins for the EXAMINE PIANO command.</p><h4>Generic components</h4><p>There are cases where you want the adventure game to give generic replies like: <em>“This doesn’t seem to work,” “I don’t see anything special about that,”</em> etc.</p><p>There are always replies that the writer can miss. We still want the game to reply something even if the writer has not provided a reply for a specific combination (a failed one, obviously), like <em>USE AMSTRAD 6128 WITH GRAND PIANO</em>.</p><p>To achieve this, we created a “generic” component, to use as a wildcard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsBsxA1IxQfCCvHDRXPWug.png" /></figure><p>Then, we program the game’s routine to first look for the specific reply requested — in this example, <em>USE AMSTRAD 6128 WITH GRAND PIANO</em> — and if it finds none, to then look for and return the reply for <em>USE AMSTRAD 6128 WITH GENERIC</em> and <em>USE GRAND PIANO WITH GENERIC</em>, whichever comes first.</p><p>If none of those is found either, the game returns the most general reply possible, the one for <em>USE GENERIC WITH GENERIC</em>, a random outcome among <em>“Mmm… Nope,” “Nawh…”</em> and <em>“This doesn’t seem to work.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QO58SRhJzimvz2tFtToYrw.png" /><figcaption>Elements diverting to various generic replies. Note: the “FOLLOW RANDOM OUTPUT” component does what its name says and will be mentioned later in the article series.</figcaption></figure><h3>Optimising the iteration</h3><h4>The Player Actions board</h4><p>For every player action, the game iterates all the project’s elements, until it finds the right one to start the dialogue from. For a short game, this does not make much of a difference, but for large games it may create a noticeable lag.</p><p>We can optimise this process, if we <strong>keep all the starting elements in one board</strong> and iterate those, instead of all. As many of the screenshots above show, those starting elements point to jumpers; they are the only elements there, since the actual dialogue trees exist in different boards. This can certainly minimise the number of iterations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fw8_PS22r40CESgMNSDIPQ.png" /><figcaption>Our short game has about 400 elements in total. The “Player Actions” board only has 78.</figcaption></figure><h4>The Board class</h4><p>As already mentioned, the Arcweave plugin has a <strong>Board</strong> class, to facilitate accessing board properties. The class grants us access to a board’s ID, custom ID, name, elements, connections, notes, jumpers, and branches. We call any of them using the object.property syntax, for example:</p><pre>var custom_id : String = my_board.customId</pre><p>By assigning a custom Board ID like PLAYER_ACTIONS to the Player Actions board, the game can easily fetch it and iterate its elements for the right one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rqK2cPi_Cgywemzua0MHgg.png" /><figcaption>This function checks for the PLAYER_ACTIONS board and throws a writer error if the Arcweave project does not have it.</figcaption></figure><p>So, this was our quest for the starting element and its journey of iteration from title text to visual components.</p><p>In the <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-3-logic-and-state-78bae82ff0d1">3rd part</a> of this series, we will discuss how our plugin gets game state and logic across from Arcweave to Godot.</p><p>Until then, you can find our plugin for Godot at its <a href="https://github.com/Arcweave/arcweave-godot-plugin">repository</a> (with documentation) or the <a href="https://godotengine.org/asset-library/asset/1601">Godot Asset Library</a>.</p><p>Play our point and click adventure demo <em>Regrets</em> on its <a href="https://arcweave.itch.io/regrets">itch.io page</a> and download its source from its own <a href="https://github.com/Arcweave/arcweave-godot-adventure-example">repository</a>.</p><p>For a simpler demo, why not try our <a href="https://github.com/Arcweave/arcweave-godot-playmode-example">Play Mode at Godot</a>, which implements Arcweave’s play mode in a simple Godot project.</p><p>Finally, watch our <a href="https://www.youtube.com/watch?v=z4n4lu5ARa0&amp;list=PLP2s5PcDiBdZq5IW7NmU3kuL_7WSm8cXM&amp;index=1">Arcweave Integrations Series</a> on YouTube, for a taste of how the plugin works.</p><p>And, of course, always… <em>Let the games begin!</em></p><p><a href="https://giannisg.medium.com/">Giannis</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is narrative director in <a href="https://arcweave.com/">Arcweave</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2f2252c595c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making a Point and Click Adventure in Arcweave and Godot — Part 1: First Prototype]]></title>
            <link>https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-1-first-prototype-b4d4039e83e0?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4d4039e83e0</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[game-writing]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 08:03:52 GMT</pubDate>
            <atom:updated>2023-02-20T12:01:43.051Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MUCaFh06KVdrq3k2VVjAnw.png" /></figure><h3>Making a Point and Click Adventure in Arcweave and Godot — Part 1: First Prototype and the Birth of a Plugin</h3><h4>How our project evolved and shaped the Arcweave plugin for Godot</h4><p>You probably know the fabulous <a href="https://godotengine.org/">Godot game engine</a>. You may even know our writing app, <a href="https://arcweave.com/">Arcweave</a>. What you may not know is that we have just released a plugin for Godot, making integration between the two so much simpler.</p><p>Our plugin was under the covers for several months. Before releasing it, we wanted to test it by creating <a href="https://arcweave.itch.io/regrets">an actual game</a>; a short demo that would showcase the ease with which you can use Arcweave to write, test, and export for Godot.</p><h4>Requirements</h4><p>In that demo game, everything having to do with writing would be done in Arcweave. Not only the dialogue trees and the replies, but also <strong>the logic</strong> had to be written in Arcweave, using variables and <strong>arcscript</strong> — Arcweave’s scripting language.</p><p>If there is a locked door and a check must take place, whether the player has the key, we would write that logic in Arcweave. Then, the logic had to be transferred to the game engine, along with all the other story content. The whole point is to <strong>decouple game writing from game development</strong>.</p><p>Moreover, we wanted to demonstrate how Arcweave can be used to create <strong>something different from the obvious choose-your-path experience</strong> we get in Arcweave’s play mode.</p><p>Therefore, we decided to create a point and click adventure. Something that would include enough game mechanics to show Arcweave can be used to create various genres, not only choose-your-path games.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6dPWErTRhNsKjaJNepWCQ.png" /><figcaption>Making dialogue with the game’s only NPC, a mentor-like character.</figcaption></figure><p>In our game, the player navigates around the room following the mouse clicks, examines and takes objects, enters doors, has conversations with an NPC, and eventually completes the game and watches a simple finale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXGsXVSJi8a_2o_78X1Wlw.png" /><figcaption>Inspired by LucasArts and fiercely proud of it…</figcaption></figure><p>The game is of course greatly inspired by the games of LucasArts, although the UI controls are greatly improvised.</p><h3>Our first prototype</h3><h4>Element content, components, and image assets</h4><p>Our first test was not a point and click. Unsurprisingly, we created a choose-your-path prototype, very much like a visual novel or Arcweave’s Play Mode itself: the player would read the content and click on options, while looking at images from the element’s cover and attached components.</p><p>It looked like this — with the wonderful art of <a href="https://www.artstation.com/ramhak">Vaggelis Manousakas</a> struggling to save the situation from the horrible UI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*9vcCWcJedUETKoahdtwzaw.gif" /><figcaption>The product of that early Arcweave-Godot integration, with visible html tags and all.</figcaption></figure><p>We used the attached components to tell the game engine who the <strong>speaker</strong> is. In other words, the character delivering the line had to be a component attached to the element that contained the line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nyEE3asueoYsrRXCWFGACw.png" /><figcaption>Attaching character components makes it easy to figure out who delivers which line.</figcaption></figure><h4>No Logic</h4><p>That first attempt was more than a year ago, when Arcweave’s only export option was a JSON file. Looking up content and following output connections using the JSON was easy.</p><p>What was not easy, though, was <strong>transferring logic from Arcweave to the engine</strong>. Whatever variables and conditional statements the project had, we had to do some serious thinking about ways to get them across the bridge, without driving people crazy.</p><p>Everything was — it still is — included in the JSON, of course. But an element’s content that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVeI4vH8deZtQviRf98GHw.png" /></figure><p>… in the JSON looks like this:</p><pre>&quot;content&quot;: &quot;&lt;p&gt;Yeah, why not. As long as you get out of my sight.&lt;\/p&gt;&lt;pre spellcheck=\&quot;false\&quot;&gt;&lt;code&gt;dragon_toenails = true&lt;\/code&gt;&lt;\/pre&gt;&quot;</pre><p>One solution would be pretending to ignore the problem: give the game dev the JSON and let them parse and translate arcscript into GDScript or whatever other language they want. Get rid of the html tags, evaluate the expressions, and implore the writer to avoid using arcscript functions.</p><p>But that would have been just terrible. From our earliest discussions on the matter, <strong>we were against having the game dev do their own parsing</strong>. We had to find a way to make our users’ lives easier.</p><h3>From JSON to Transpilation</h3><h4>Godot-Ready JSON</h4><p>The next idea was to export an <strong>engine-specific JSON</strong> — in our case, a Godot-oriented JSON. Instead of getting an element’s content as a string, we would get a GDScript function.</p><p>This meant that an element content that looked like this (the example coming from our point and click game):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zDyeYzNUqCM-oUz0z3vyVQ.png" /></figure><p>… in the Godot-oriented JSON it would look like this:</p><pre>&quot;content&quot;: &quot;func content():\n\tvar contentResult: String = \&quot;\&quot;\n\tcontentResult += \&quot;My reasons were not good enough. \&quot;\n\treturn contentResult.trim_suffix(\&quot; \&quot;)&quot;</pre><p>It looked even more chaotic than before — note that this example does not even contain any arcscript — but at least it was Godot-ready. Whatever the plugin would look like, it would have to load JSON’s content() function to an instance of the GDScript class and evaluate it, getting in return the element&#39;s content, regardless of whether it included arcscript or not. We dealt with if-branches in a similar way.</p><p>The system worked and we built the first version of our point and click game with it. The logic came through; it was magical. We even implemented arcscript’s roll() function. For the first time, we could write <em>anything</em> in Arcweave and get it across, to Godot.</p><p>But our dev team was itching to do better.</p><h4>Transpilation upon export</h4><p>Since we export for Godot, <em>why even export to JSON?</em> We can <strong>export .gd files</strong>, instead, ready to be used directly by the game engine and <strong>work organically with our plugin’s classes</strong> (Story, Board, Element, and Component).</p><p>This final version of the Arcweave plugin includes the static .gd files used by all projects, while Arcweave itself exports the project-dependent files data_export.gd and state_export.gd.</p><p>To export those, you go to <strong>Arcweave</strong> &gt; <strong>Export</strong> &gt; <strong>Game Engine</strong> &gt; <strong>Godot</strong>. This saves a .zip file containing the files to be imported into the engine. It is the obvious, but not the only way.</p><h3>Web API</h3><p>Since Arcweave is a web app, why not <strong>use a web API</strong>? You can fetch the necessary project files straight into your Godot project, without even leaving the engine’s editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmLzg6woEJ0tXjxxvGcFug.png" /><figcaption>Screenshot from Godot’s IDE, with the Arcweave tab open. By clicking “Refresh Project,” you automatically fetch all project changes, without hassle.</figcaption></figure><p>Suddenly, developing the game started becoming much more fun. The latest version of the project data gets passed straight from the source and on to Godot, by hitting “Refresh Project.” The writers do not have to send any project files to the dev and the team does not worry about which .zip contains the latest changes.</p><p>And so it happened. The plugin developed and our game developed with it. In the <a href="https://giannisg.medium.com/making-a-point-and-click-adventure-in-arcweave-and-godot-part-2-starting-a-dialogue-e2f2252c595c">2nd part</a> of this series, we will talk about our quest for the dialogue’s starting element and how it evolved from a mundane iteration through element titles to something much more visual and user-friendly.</p><p>Until the next article in this series, you can find our plugin for Godot at its <a href="https://github.com/Arcweave/arcweave-godot-plugin">repository</a> (with documentation) or the <a href="https://godotengine.org/asset-library/asset/1601">Godot Asset Library</a>.</p><p>Play our point and click adventure demo <em>Regrets</em> on its <a href="https://arcweave.itch.io/regrets">itch.io page</a> and download its source from its own <a href="https://github.com/Arcweave/arcweave-godot-adventure-example">repository</a>.</p><p>For a simpler demo, why not try our <a href="https://github.com/Arcweave/arcweave-godot-playmode-example">Play Mode at Godot</a>, which implements Arcweave’s play mode in a simple Godot project.</p><p>Finally, watch our <a href="https://www.youtube.com/watch?v=z4n4lu5ARa0&amp;list=PLP2s5PcDiBdZq5IW7NmU3kuL_7WSm8cXM&amp;index=1">Arcweave Integrations Series</a> on YouTube, for a taste of how the plugin works.</p><p>And, of course, always… <em>Let the games begin!</em></p><p><a href="https://giannisg.medium.com/">Giannis</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is narrative designer in <a href="https://arcweave.com/">Arcweave</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4d4039e83e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On text adventure “Spider and Web”]]></title>
            <link>https://giannisg.medium.com/on-text-adventure-spider-and-web-adba284de33e?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/adba284de33e</guid>
            <category><![CDATA[series]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[interactive]]></category>
            <category><![CDATA[games]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Tue, 02 Nov 2021 10:05:21 GMT</pubDate>
            <atom:updated>2021-11-02T10:06:25.066Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZCFM1urszoRNqG7VjIbxXw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@photoholgic?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Photoholgic</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a> (cropped by the author)</figcaption></figure><h4>YouTube series on interactive fiction debuts with ’90s espionage gem</h4><p><a href="https://arcweave.com/">Arcweave</a> just launched a new video series dedicated to <strong>interactive fiction</strong> — aka text adventures or text games. In each episode, we take a look at the finest and most famous examples of interactive fiction and hopefully acquire some wisdom on game narrative design.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fpge4_rLY7Q8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dpge4_rLY7Q8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fpge4_rLY7Q8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f92186038e0123741b6a72069d628acf/href">https://medium.com/media/f92186038e0123741b6a72069d628acf/href</a></iframe><p>In the first episode, we take a look at the ’90s espionage thriller <em>Spider and Web</em> by <a href="https://zarfhome.com/">Andrew Plotkin</a>. It is a parser game written on <a href="https://www.inform-fiction.org/">Inform 6</a> that won five <a href="https://www.ifwiki.org/index.php/XYZZY_Awards_1998">XYZZY Awards in 1998</a> and has been rated first on the list of <a href="https://ifdb.org/viewcomp?id=oymvom4wrawhd4hr">Interactive Fiction Top 50 of All Time</a>.</p><p>The game has outstanding merit in language, mechanics, character development, and plot. What we particularly focus on in this episode, though, is the exceptionally good use of the <strong>unreliable narrator</strong> — and player character, in our case.</p><h3>The setting</h3><p>The story opens with you casually wandering as a tourist around the capital of some unspecified country. You have just reached a back alley of some nondescript brick building featuring a metallic door without a handle.</p><figure><img alt="Screenshot from the game; the first scene." src="https://cdn-images-1.medium.com/max/1024/1*5bB89_k7SJUYYpRtxYPgqg.jpeg" /><figcaption>The opening scene of <em>Spider and Web.</em></figcaption></figure><p>You carry nothing and — unable to open the door — you casually stroll away.</p><p><strong>CUT TO</strong>: You are now imprisoned on a chair inside that very building, while a mysterious interrogator questions you about your methods and intentions. The previous scene was actually the story you tried (and failed) to sell him, of you being an innocent sightseer.</p><figure><img alt="Screenshot from the game; the first moment of the interrogation scene" src="https://cdn-images-1.medium.com/max/1024/1*L32hxEeAZl5Xcg1tzxHgqQ.jpeg" /><figcaption>Your captor shows great patience with your stories, but don’t try to push it too far.</figcaption></figure><p>So he asks you to tell the truth. And to do that, you replay the first scene, but <em>in a way that sounds more believable to your interrogator.</em></p><p>And this is the first example of how this story uses the element of the unreliable narrator in an original and organic way.</p><h3>Plot flow</h3><p>This pattern of replaying the steps that don’t make sense to your captor continues during the first half of the game.</p><p>If we put those story beats on an Arcweave board, we can see the <strong>scenes of the past</strong> (the green—sorry, <em>vert amande</em> elements, representing the story you tell) and the <strong>scenes of the interrogation</strong> (maroon — er… amb — er ombr — well, <em>brick red,</em> in the present moment).</p><figure><img alt="Diagrammatic analysis of the first scene on Arcweave." src="https://cdn-images-1.medium.com/max/1024/1*hombPlxT3nkzVbPij7ngew.png" /><figcaption>How the first scene flows, intercutting between flashbacks and present.</figcaption></figure><p><strong>I</strong>. The first scene is, as we’ve said, the <strong>first version</strong> of the story you tell your interrogator: you are carrying nothing, you reach a door you can’t open, and walk away from the alley.</p><p><strong>II</strong>. Cut to the present, and the interrogator doesn’t believe you.</p><p><strong>III</strong>. Back to the first scene, to play a <strong>second version</strong> of the story. Again, there is not much you can do, so you try to force the door open, to no avail.</p><p><strong>IV</strong>. Back to the present, the interrogator <em>still</em> doesn’t believe you. Moreover, he now introduces a <em>lockpick</em> that they have apparently confiscated from you.</p><p><strong>V</strong>. Back to the first scene for a <strong>third version</strong> of how it played out. Now, if you take inventory, you <em>actually carry that lockpick</em> and you can use it to open the door.</p><p><strong>VI</strong>. Back to the present, the interrogator is now satisfied with your story, allowing you to go on with it. Furthermore, he prompts you to reveal every other equipment you may have been carrying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7nDuhyhKekrP5t87K-JC7A.jpeg" /><figcaption>Spider and Web features some of the most memorable gadgets ever introduced in an adventure game.</figcaption></figure><h3>Mystery and surprise</h3><p>Very soon you realise that, in order to beat the game, you must figure out what your character knows, which you — and your antagonist — don’t.</p><p>Regarding what the protagonist, the antagonist, and the player know, there is a <strong>wonderful dance of mystery and surprise </strong>escalating to the unforgettable (and famous among players) moment of your escape from the interrogation chair; none other than the puzzle that won the Best Individual Puzzle of the 1998 XYZZY Awards.</p><h3>Play it</h3><p>Andrew Plotkin’s <em>Spider and Web</em> is a superb game and we hope we have intrigued you to <strong>go and play it</strong>. You can <a href="https://ifdb.org/viewgame?id=2xyccw3pe0uovfad">download it from IFDB</a> and run it on any of the various interactive fiction interpreters out there (<a href="https://www.electronjs.org/apps/lectrote">one of them</a> written by Plotkin himself) or play it <a href="https://www.eblong.com/zarf/zweb/tangle/">on your browser</a>, on the author’s website.</p><p>Moreover, if interactive fiction strikes a chord, stick around <a href="https://www.youtube.com/channel/UCv_68ZcocV-zLntAHjZ7j3g">Arcweave’s YouTube channel</a>, for <strong>more episodes</strong> on wonderful text games.</p><p>Finally, if you <strong>design your own games</strong> and interactive stories, you may find <a href="https://arcweave.com/">Arcweave</a> helpful. Use it to organise your material, turn your ideas into a playable prototype, and even publish it as a choice-based game to share with the world.</p><p>Let the games begin!</p><p><a href="https://medium.com/u/e8b6e3737f5a">Giannis G. Georgiou</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is content writer and creator in <a href="https://arcweave.com/">Arcweave</a>.</p><p>If you enjoyed this piece, you can also read:</p><ul><li><a href="https://superjumpmagazine.com/how-to-start-writing-interactive-fiction-65e3ea5b8ad5">How to Start Writing Interactive Fiction</a></li><li><a href="https://superjumpmagazine.com/fun-grief-completionism-in-games-ee00966d1e62">Fun &amp; Grief: Completionism in Games</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adba284de33e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Write a Quest-Based RPG]]></title>
            <link>https://medium.com/super-jump/how-to-write-a-quest-based-rpg-6d716fb83ea4?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d716fb83ea4</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[features]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Tue, 03 Aug 2021 19:32:25 GMT</pubDate>
            <atom:updated>2021-09-12T10:36:05.118Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BGhU2aKBJ1UMhUni-w-WA.png" /></figure><h4>This is how I wrote my last article’s companion game</h4><p><strong>My previous article, </strong><a href="https://superjumpmagazine.com/fun-grief-completionism-in-games-ee00966d1e62"><strong><em>Fun &amp; Grief: Completionism in Games</em></strong></a><strong><em>,</em> was about the urge some players have to <em>complete</em> a game — take all the quests and see everything. Moreover, it was published along with a little companion game, which was a fun attempt to illustrate the point.</strong></p><figure><img alt="Screenshot from the game on Arcweave’s play mode, showing a cartoonish illustration of a food market, followed by the action description, and the player’s clickable choices." src="https://cdn-images-1.medium.com/max/1024/1*6dnlW92jPSvX934X9dSyaw.png" /><figcaption><em>Screenshot from one of the game’s side quests.</em></figcaption></figure><p>The game is a very simplified text-based RPG, in a generic fantasy setting. I wrote it on <a href="https://arcweave.com/">Arcweave</a> — and you can play it on your browser <a href="https://arcweave.com/app#/project/oKELJD80W2/play">here</a>. It features a main quest, 7 side quests, and a final screen that tells you which ones you pursued and which ones you missed.</p><p>For those interested in other people’s creative process, this post is a short account of how I made that little game.</p><h3>Prep work</h3><h4>Research and brainstorming</h4><p>I had a notion of what a side quest (probably) is and I could (probably) sit down and come up with a handful of ideas.</p><p>Still, I am not <em>that</em> experienced in RPGs. Experienced players and DMs from all around the world <em>must</em> have already come up with tons of great side quest ideas. All I needed to do was read their lists and <strong>shamelessly steal</strong> from them.</p><p>A couple of years ago, Nerdarchy published this <a href="https://nerdarchy.com/dd-ideas-side-quests/">great list of RPG side quest ideas</a>, while Boccob’s Blog has <a href="https://boccobsblog.com/2011/04/18/101-dd-quest-ideas/">several</a> such lists, as well.</p><p>After reading some of those epic lists and steal…erm…<em>taking notes,</em> there came the moment for pen and paper. I did a couple of brainstorming sessions on a little notebook and came up with a list, like this one:</p><ul><li><em>trapped in a manor, must escape sadistic host.</em></li><li><em>rescue kid from ogre’s lair.</em></li><li><em>go shopping (armour/weapons/herbs/etc).</em></li><li><em>defeat yourself in combat in Valley of Mirrors.</em></li><li><em>find spell component for wizard.</em></li><li><em>…</em></li></ul><p>Some sounded more interesting, some sounded more tedious and complicated. The next step was to sort out which ones to use.</p><h4>Choosing main and side quests</h4><p>Definitely stealing from Stephen Hand’s <a href="https://fightingfantasy.fandom.com/wiki/Moonrunner_(book)"><em>Moonrunner</em></a><em>,</em> I decided that the main quest would be about tracking down some villain and handing them over to the authorities.</p><p>In regard to the side quests, I already had a list, but not every side quest ended up being from the list. A lot of them popped up after I started structuring the beast.</p><h3>Writing</h3><p>To write, I used <a href="https://arcweave.com/">Arcweave</a>, my tool of choice when it comes to designing interactive stories. I can quickly <strong>set up key plot points</strong> with broad strokes and <strong>then dive deeper and write scenes</strong>, without losing the bigger picture.</p><p>When I started adding my first elements and connections, <em>I still had no content.</em></p><h4>Structure first</h4><p>The first diagram I did was of a very general plot flow. I arbitrarily declared that the plot would have 5 or 6 main steps and named them “<strong>MQ1</strong>,” “<strong>MQ2</strong>,” etc — “<strong>MQ</strong>” standing in for “<strong>Main Quest</strong>.”</p><p>Of course this didn’t mean much, but it was a much better way to start, than looking at an empty page.</p><p>Then, also completely arbitrarily, I added some <strong>side quests</strong> here and there, naming them “<strong>SQ1</strong>,” “<strong>SQ2</strong>,” etc. I still had no idea what they would be. I only wanted to have an overview of the size and the form.</p><p>I also knew I wanted a couple of the side quests to be related — for example SQ5 to be available only if you have completed SQ2. (Although this didn’t end up being a case.)</p><figure><img alt="Screenshot from the project environment on Arcweave, showing the game’s general structure as a diagram." src="https://cdn-images-1.medium.com/max/1024/1*x_6Zfytt6JT_NwyICDMMTw.png" /><figcaption><em>The first plot flow diagram looked like this. This is obviously not a functional flow chart — it doesn’t have two-way connections (so you can’t return from a side quest), let alone specific content — but it was more inspiring than staring at a blank board.</em></figcaption></figure><p>Placeholders are magical things. While waiting for the idea to join you, you keep a seat for it. It felt like laying down a row of empty plates, to be filled with a variety of delicacies. I just didn’t know what the food would be, yet.</p><h4>Writing the quests</h4><p>I liked the idea of starting the plot in a city. I had just recently finished <a href="https://www.inklestudios.com/sorcery/"><em>Sorcery! 2</em></a> with its unforgettable city of Kharé — and <em>Moonrunner</em> took place in a city, as well. Both very well-written and inspiring stories.</p><p>Of course, I knew I wasn’t going to expand the story to a full game, neither did I want the whole plot to stay in a city. Still, it felt cool to start in a busy place, before going through the wilderness of Rocky Valley.</p><figure><img alt="Screenshot from the project’s environment on Arcweave showing the diagram of one of the side quests." src="https://cdn-images-1.medium.com/max/1024/1*ZErxkoWaEUQ5z15Oxad5dA.png" /><figcaption><em>The diagram of the pickpocket sequence. Arcweave allows breaking down the plot in multiple diagrams — called boards. This means each scene or side quest can have its own board, without cluttering the main story’s flowchart.</em></figcaption></figure><p>The first side quest I wrote was the pickpocket sequence. Once I finished writing it, I felt I needed a plan.</p><p>I took one step away from the diagram, opened a plain text file, and forced myself to fill in some gaps:</p><pre>MARKET OF LAM&#39;IA (MQ1)<br>----------------------</pre><pre>MAIN GOAL:<br>Get to the Chaotic Neutral Tavern.</pre><pre>OPTIONAL STUFF:<br>* help a merchant carry wheat. REWARD: str + gold.<br>* someone picks your pocket. Do you pursue?</pre><pre>CHAOTIC NEUTRAL TAVERN (MQ2)<br>----------------------------</pre><pre>MAIN GOAL:<br>Talk to the person called The Shadow.</pre><pre>OPTIONAL STUFF:<br>* beat local drinking champion in contest. REWARD: money.<br>* take part in a brawl. REWARD: ???<br>* do nothing and quietly drink your ale.</pre><pre>...</pre><p>What I needed to keep in mind is that <strong>every scene had to have a clear objective</strong> for the player. Moreover, all those scene objectives had to be <strong>parts of the overall goal</strong> of finding and catching the villain.</p><p>To stick with this, <strong>I tricked my intellect into filling in this boring report</strong> — there is nothing fancy about a plain text file and that’s where its power lies. The report had the strict format of <em>“LOCATION/MAIN GOAL/OPTIONAL STUFF”</em> and left <strong>no room for shying away from the necessary points</strong> I wanted to nail down:</p><ol><li>find one goal per MQ step that advances the main plot.</li><li>break down the MQ in a variety of locations.</li><li>pin down the SQs.</li></ol><p>After delivering myself this report, I could go back to having fun with Arcweave diagrams and start writing the game scene by scene.</p><h4>Breaking it down to multiple boards</h4><p>One of the things I love about Arcweave is the option to break the story down in multiple boards. You can then access those from the list on the sidebar, as in the classic folder structure found in various apps.</p><figure><img alt="Screenshot from Arcweave’s UI: the sidebar shows the list of the project’s boards." src="https://cdn-images-1.medium.com/max/1024/1*k3m6yf2wDfh5bkLaHoTlag.png" /><figcaption><em>Keeping each side quest on its own board, I could easily jump back and forth during the writing process.</em></figcaption></figure><p>This helps expand the whole story in as many chapters as you like, while keeping its parts easy to read and access.</p><p>As each side quest expanded in multiple elements, I moved it to its own board and used jumpers to access it from the Main.</p><figure><img alt="Screenshot from Arcweave demonstrating the use of jumpers, which are basically aliases for the project’s nodes (or elements, as they are called)." src="https://cdn-images-1.medium.com/max/1024/1*9t203cIXxPqCRvuTdyppPA.png" /><figcaption><em>To pass the story flow from one board to another, Arcweave uses jumpers. In this screenshot from the project, two jumpers send the flow to two elements on the “dialogue Druid” board.</em></figcaption></figure><h3>Finishing touches</h3><h4>Final screen</h4><p>To track which quests the player pursued — and which of them successfully — I created an integer variable for each quest.</p><figure><img alt="Screenshot from Arcweave’s UI for managing the project’s global variables. One column shows the variable’s name, the second shows the type (here, integer), and the third column shows the variable’s initial value." src="https://cdn-images-1.medium.com/max/1024/1*hk8x-P5AMtOXS_S4wP86gg.png" /><figcaption><em>By using one variable per side quest, the game knows which of them the player completes, fails, or skips.</em></figcaption></figure><p>All those variables have an initial value of 0, which means the player hasn’t taken the quest.</p><p>If the player takes the quest, the value ends up becoming either 1 (if they have succeeded) or -1 (if they have failed). In other words, if the player has taken a quest, the relevant variable’s <strong>absolute value</strong> will be 1.</p><p>Adding all the variables’ absolute values, I get the number of the quests the player has gone after: quest_sum = abs(quest_1) + abs(quest_2) + ...</p><figure><img alt="Screenshot from Arcweave: the code that runs under the hood, at the game’s final screen." src="https://cdn-images-1.medium.com/max/1024/1*t81kh4raPA0heB9XdNNurg.png" /><figcaption><em>The final screen is basically one long Arcweave element that performs a series of “if” checks and renders the appropriate content.</em></figcaption></figure><p>Then, all I had to do was write a list of if statements, covering the results for each quest, rendering “SUCCESS” or “FAILURE” accordingly.</p><figure><img alt="Screenshot from Arcweave: the code that runs under the hood, at the game’s final screen." src="https://cdn-images-1.medium.com/max/1024/1*oSeLx4NIKtr3ZZQ0FRUKIg.png" /><figcaption><em>By checking each quest’s variable, the game prints a message of SUCCESS or FAILURE for it.</em></figcaption></figure><p>And this is how it looks on Arcweave’s play mode:</p><figure><img alt="Screenshot from Arcweave’s play mode: the game’s final screen showing which quests the player pursued." src="https://cdn-images-1.medium.com/max/1024/1*TpKACj14-1PyYsW46rrTOg.png" /><figcaption><em>Should I also get the game to rank the player as “casual” or a “completionist?” As in: “During the course of tracking down the villain, you pursued 2 side quests. YOU ARE A LITTLE CASUAL, AREN’T YOU?”</em></figcaption></figure><h4>Images</h4><p>Finally, let’s not forget about the wonderful art that I was lucky enough to find for the game. Here is a sample, in all its glory:</p><figure><img alt="Cartoonish illustration of a medieval tavern’s interior." src="https://cdn-images-1.medium.com/max/1024/1*KaINCPSa6yu76Eh27pNDSQ.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/man-beer-pub-with-barista-stand-desk-benches-tables_11683967.htm"><em>Image</em></a><em> by </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on </em><a href="https://www.freepik.com/"><em>Freepik</em></a><em>.</em></figcaption></figure><p>All the images on the game are from <a href="https://www.freepik.com/">Freepik</a> and they are free to download and use — as long as one credits the source (which one should always do, anyway).</p><p>For the credits, I created a special page that is accessible at the very beginning and the very end of the game’s play-through.</p><h3>Aftermath</h3><h4>Writing process</h4><p>Creating this game didn’t take more than a week of part-time work. It was great fun to write and it certainly didn’t aspire to be anything more than what it is — a little treat for the readers of my <a href="https://superjumpmagazine.com/fun-grief-completionism-in-games-ee00966d1e62">article on completionism</a>.</p><p>I once again had the opportunity to test the tools I use and the process I have come to follow, which I describe in my <a href="https://superjumpmagazine.com/how-to-start-writing-interactive-fiction-65e3ea5b8ad5">post on writing interactive fiction</a>. No story is the same with any other, but after staring at a blank page until your eyes need recalibrating, you realise a little methodology wouldn’t hurt.</p><p>And as for the tools, yep, they still work: mostly good old fashioned pencil and paper (for the messy part of the work) and <a href="https://arcweave.com/">Arcweave</a> for the polishing and testing.</p><h4>Trying it on for size</h4><p>I must admit that — for an article’s companion game — it turned out to be a little longer to play than I wanted. Especially if you take on several of the side quests, the time you can spend playing it is considerably more than 5 minutes.</p><p>I did some editing, but I didn’t want to cut it down.</p><p>First of all, I didn’t want to reduce the number of the side quests. The whole point of this game is to offer multiple options, which the player can honour or ignore.</p><p>Neither did I feel like cutting down each scene’s narration. If I had forced it into a smaller size, I would have taken away the feeling of reading a story and would have created a feeling of reading a shopping list, like:</p><ul><li><em>You are on your way to the Chaotic Neutral Tavern. Someone picks your pocket. Do you follow (click here) or do you ignore it (click there)?</em></li><li><em>You ignore then incident. You continue to the tavern. There is a brawl. Do you join in (click here) or do you ignore it (click there)?</em></li><li><em>You join the brawl. You aren’t strong enough, so they kick your derrière. There is also a drinking competition. Do you click here or there?</em></li></ul><p>Something tells me this wouldn’t have been so much fun.</p><p>But don’t take my word for it. Go <a href="https://arcweave.com/app#/project/oKELJD80W2/play">play the game</a> yourself. Tell me what you think.</p><p><a href="https://medium.com/u/e8b6e3737f5a">Giannis</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is content writer in <a href="https://arcweave.com/">Arcweave</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*3lf9Y6mHxoxpSSFOw6gjlw.png" /><figcaption>Cover image by <a href="https://pixabay.com/users/jw432-7947668/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=3194227"><em>jw432</em></a><em> from </em><a href="https://pixabay.com/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=3194227"><em>Pixabay</em></a><em>. This piece was originally published at </em><a href="https://gamasutra.com/blogs/GiannisGeorgiou/20210727/385684/How_to_Write_a_QuestBased_RPG.php"><em>Gamasutra</em></a><em>. It has been revised and published at SUPERJUMP with permission.</em></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d716fb83ea4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-jump/how-to-write-a-quest-based-rpg-6d716fb83ea4">How to Write a Quest-Based RPG</a> was originally published in <a href="https://medium.com/super-jump">SUPERJUMP</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fun & Grief: Completionism in Games]]></title>
            <link>https://medium.com/super-jump/fun-grief-completionism-in-games-ee00966d1e62?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee00966d1e62</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[features]]></category>
            <category><![CDATA[psychology]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Mon, 26 Jul 2021 15:03:17 GMT</pubDate>
            <atom:updated>2021-07-28T09:26:52.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dBufOSG_EUxTEYKQlJBI_A.png" /></figure><h4>Deeper than just a quirky gaming habit</h4><p><strong>When it comes to a book or a film, there is only one path to experience it: <em>we start at the beginning and finish at the end. </em></strong>This doesn’t mean there is only one storyline. Nor does it mean the story is told in chronological order. What it means is, in a book or a film, there are <strong>no choices, no branching, and no randomness</strong> — there may be for the characters, but <em>not for the reader or viewer</em>. As a consequence, we get to see <em>all the content in one go.</em> Nothing gets left out.</p><figure><img alt="The 3-Act structure of a film, as a basic diagram." src="https://cdn-images-1.medium.com/max/1024/1*4BOXITC1XiQKojA2whUlLA.png" /><figcaption><em>The archetypal structure of a film’s story as a linear diagram. Note: All diagrams in the article are made with </em><a href="https://arcweave.com/"><em>Arcweave</em></a><em>.</em></figcaption></figure><p>Games on the other hand offer choices, branching narrative, randomness, and often multiple endings. Not only do <strong>we get to choose</strong>, but we also get to <strong>miss out</strong> on huge parts of the content!</p><figure><img alt="Diagram of an interactive story." src="https://cdn-images-1.medium.com/max/1024/1*-NQu0tDmTIX6kJ8wzUcuLg.png" /><figcaption><em>In interactive narrative, the structure hardly stays linear. Instead, </em><a href="https://heterogenoustasks.wordpress.com/2015/01/26/standard-patterns-in-choice-based-games/"><em>various plot formations</em></a><em> are created, like branches and bottlenecks.</em></figcaption></figure><p>This structure creates an extra tension to the player: <em>“is there more that I haven’t experienced?”</em> And this is a compelling part of the allure games have.</p><p>Too compelling, perhaps. Some people simply want to see <em>everything. </em><strong>Completionism</strong> is the compulsion to <a href="https://www.youtube.com/watch?v=sXZxUpAL0AE">go after every objective</a> in a game. It goes beyond the hedonism of wanting to leave no virtual stone unturned and reaches OCD levels of…wanting to leave no virtual stone unturned.</p><p>Although usually referenced as a compulsion towards collecting game achievements, completionism is used in this story in a broader sense.</p><blockquote>Let’s accept that there is a tendency towards completing tasks and different people have it to different degrees.</blockquote><p>Is this tendency something skin-deep or the tip of some mysterious iceberg that reaches unexplored depths of our existential angst?</p><figure><img alt="Screenshot of this article’s companion game: image of a cartoonish tavern’s interior, the location’s description, and the player’s choices." src="https://cdn-images-1.medium.com/max/1024/1*e3SNwtk8K-aCANhohfAL9A.png" /><figcaption>This article comes with a companion game. How many side quests will you be after? I was lucky enough to come across great illustrations like <a href="https://www.freepik.com/free-vector/old-tavern-vintage-pub-with-wooden-bar-counter-shelf-with-bottles-lanterns-beer-mug-table-vector-cartoon-empty-interior-retro-saloon-with-barrel-darts-target-wall_11420831.htm"><em>this one</em></a><em> by </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on Freepik.</em></figcaption></figure><p><em>To help you audit (or celebrate) your degree of completionism, </em><strong><em>I created a little online game</em></strong><em> as a companion to this story. I wrote it on </em><a href="https://arcweave.com/"><em>Arcweave</em></a><em> and you can freely play it on your browser — you will find the link at the end of this post.</em></p><h3>The spectrum of completionism</h3><p>Don’t get confused: <em>wanting to replay a game does not make you a completionist.</em> Few players will settle for what just one play-through has to offer and the average gamer will replay a high-replayability game.</p><p>What the average gamer won’t do, though, is <strong>insist</strong> and <strong>grind</strong>. Complete <em>all the sidequests.</em> Collect <em>all the badges.</em> Unlock <em>all the features.</em>Discover <em>all the easter eggs.</em></p><figure><img alt="Diagram of an imaginary game’s moment where, if specific conditions are met, the player unlocks an “easter-egg” side quest." src="https://cdn-images-1.medium.com/max/1024/1*d9ab__OtdJIbcN9nnCa--A.jpeg" /><figcaption><em>Easter egg content gets unlocked only if very specific conditions are satisfied.</em></figcaption></figure><p>So let’s explore the spectrum of this human tendency to complete things.</p><figure><img alt="Cartoonish illustration of a tavern’s interior." src="https://cdn-images-1.medium.com/max/1024/1*KaINCPSa6yu76Eh27pNDSQ.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/old-tavern-vintage-pub-with-wooden-bar-counter-shelf-with-bottles-lanterns-beer-mug-table-vector-cartoon-empty-interior-retro-saloon-with-barrel-darts-target-wall_11420831.htm"><em>Image</em></a><em> by </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on Freepik.</em></figcaption></figure><h4>The Casual</h4><p>The first type of player dwells at the outskirts of the spectrum. They won’t sweat much over achieving goals or optimising their process — unless their goal is <strong>to enjoy themselves</strong>.</p><p>Casual players show <strong>the least amount of completionist behaviour</strong>. This doesn’t mean they won’t play a game twice, rather that their approach to gaming has no compulsion. Also, <em>“casual” doesn’t mean they don’t care.</em> They may very well have the <strong>desire to finish the game</strong>, but their <strong>desire to have fun</strong> is more important to them. They refuse to jeopardise it, even if it means they’ll have to abandon the game altogether.</p><p>Those players either have this as a natural state or they have grown into it, through overcoming compulsions like completionism itself.</p><p>But let’s not get ahead of ourselves.</p><figure><img alt="Cartoonish illustration of a dungeon’s closed door." src="https://cdn-images-1.medium.com/max/1024/1*5ktf2GMUq7ZkI5OSpXKFzg.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/broken-wooden-door-medieval-castle-old-wood-gate-stone-wall-with-flaming-torches-night_15679005.htm"><em>Image</em></a><em> by </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on Freepik.</em></figcaption></figure><h4>The Disciplined</h4><p>The second type is also positioned at the outskirts of the spectrum. They play the game with curiosity and interest, but their <strong>strong boundaries</strong> stop them from over-investing. They know <strong>their limits</strong> in time and energy — and are <strong>determined to respect them</strong>.</p><p>Perhaps they have a soft spot they are fully aware of: a proneness to binge-playing — even to completionism itself — if they let themselves.</p><p><em>So they don’t.</em> And if they do, their two natures fight each other, often resulting in self-punishment: <em>“I shouldn’t have stayed up all night…”</em></p><figure><img alt="Cartoonish illustration of a food market." src="https://cdn-images-1.medium.com/max/1024/1*zy-ZmBOxu54HE07ApE1fTw.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/food-market-stalls-with-fruits-vegetables-cheese-meat-fish-counter-crates_12566293.htm"><em>Image</em></a><em> by </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on Freepik.</em></figcaption></figure><h4>The Calculating</h4><p>The calculating player is clearly inside the spectrum of completionism, but quite far from the centre. For them, the most important reason they replay a game is <strong>to get their money’s worth</strong>.</p><p>Their gaming experience feels like a <strong>financial transaction</strong>. Their motto is <em>“Missed content is wasted content.”</em> The question they ask themselves upon finishing a game is <em>“Did I break even?”</em></p><p>I’m not judging this approach. Games are expensive and nobody wants to waste money. All I’m saying is this: compulsively completing a game just to get our money’s worth <strong>isn’t the best way to enjoy ourselves</strong>.</p><figure><img alt="Cartoonish illustration of an artist’s studio." src="https://cdn-images-1.medium.com/max/1024/1*yTEFeA6mwI6a8a5mIQFH5g.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/art-studio-classroom-with-easels-paints-brushes-shelves-bust-paintings-wall_15241099.htm"><em>Image</em></a><em> by </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on Freepik.</em></figcaption></figure><h4>The Craftsperson</h4><p>This is a very particular case of player. It is the person who studies games because <strong>they want to know their mechanics</strong>. They will not grind to boost their stats, but to see <em>“How many times can I try this before responses start getting repetitive?”</em></p><p>They design games themselves, so part of their job is <em>analysing</em> them. Learning how things work under the hood.</p><p>The craftsperson <em>must</em> play and replay. The <em>must</em> see if an outcome is random or based on some algorithm. See what always happens and what varies with each play through. Speculate <em>how something works.</em> Go back and try different paths. Do silly things, just to see if the designers have predicted such player behaviour.</p><figure><img alt="Cartoonish illustration of a dungeon’s torture chamber." src="https://cdn-images-1.medium.com/max/1024/1*Y30eN5Cyi2Ei49OBBwr8bQ.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/illustration-with-medieval-prison-cell-criminals-castle-dungeon-room-prison_3586245.htm?query=dungeon"><em>Image</em></a><em> by </em><a href="https://www.freepik.com/vectorpocket"><em>vectorpocket</em></a><em> on Freepik.</em></figcaption></figure><h4>The Pure Completionist</h4><p>This type is at the centre of the spectrum. They simply <em>don’t want to miss out</em> on any part of a game’s content: easter eggs, hidden equipment, impossible score points — things that a casual player won’t come across with a casual play through.</p><p>For this type, it has nothing to do with money or craft. This is where completionism manifests itself as an irresistible <a href="https://www.psychologytoday.com/us/basics/compulsive-behaviors"><strong>compulsion</strong></a>.</p><blockquote>The reason behind it? Fear of death and fear of missing out.</blockquote><p>What? Don’t you believe me?</p><h3>What lies beneath</h3><p>Why play games compulsively? It must have to do with the question, <em>“Why play games at all?”</em> What is the deeper reason we do it in the first place?</p><h4>Our craving for immortality</h4><p>Life is very much like games. It is full of pleasant and painful events. It offers opportunities and choices.</p><p>But there is a huge difference: <em>life doesn’t have UNDO, RESTORE, or RESTART.</em> We can’t SAVE. We can’t go back and replay a part where we messed up.</p><blockquote>In life, we can’t raise the dead.</blockquote><p>On the other hand, in games, <strong>reincarnation is easy</strong>. We can just RESTART. And because even restarting is a painful process, we can also SAVE and RESTORE.</p><p>This privilege of virtual reincarnation is one of the deeper reasons we are so into gaming. Playing games, on a deeper level, is a way to experience immortality — and a fun one, that is.</p><h4>Fear of missing out</h4><p>Choosing is hard. Choosing one thing means losing another. Robert Frost’s poem “<a href="https://www.poetryfoundation.org/poems/44272/the-road-not-taken">The Road Not Taken</a>” begins with the grief of a traveller who couldn’t be in two places at the same time:</p><blockquote>Two roads diverged in a yellow wood,<br>And sorry I could not travel both</blockquote><p>And sometimes it’s more than two. An open-world game seems to have infinite possibilities.</p><p>Like life.</p><p>After choosing an option, a part of us has the fun, while another part laments the roads not taken. <em>“What about the other option? Would the grass be greener over there?”</em></p><p>Missing out can cause distress. It evokes the primal <a href="https://tinybuddha.com/blog/overcoming-the-fear-of-loss-5-steps-to-get-unstuck/">fear of loss</a> — even the <em>fear of death</em> itself.</p><p>Missing out on a story’s <em>content</em> doesn’t sound like a major reason for <a href="https://www.helpguide.org/articles/grief/coping-with-grief-and-loss.htm">grief</a>. Still, it can be big enough to trigger compulsive attempts to regain control — enter completionism.</p><blockquote>Like double-checking the stove is off, the pure completionist will grind and exhaustively explore a level’s geography, seeking feelings of safety and comfort.</blockquote><p>When it comes to choice, completionism is the manifestation of our <em>desire to both have the cake and eat it.</em> Only games can offer us this privilege.</p><p>Why say no to that?</p><h3>Letting go</h3><p>We don’t actually have to say no to anything, if it works and gives us joy. The problem with completionism is it usually <strong>takes away much of the joy of gaming</strong>. An online search for the term “completionism” leads to <a href="https://www.reddit.com/r/truegaming/comments/iz01bb/fomo_within_games_ruining_my_enjoyment/">gaming forum threads</a>, where players confess their lack of enjoyment.</p><p><a href="https://rectifygaming.com/opinion-being-a-completionist-is-a-curse/">Is completionism a curse?</a> Are completionism and fun mutually exclusive? The more we position ourselves towards the spectrum’s centre, the more often the answer seems to be a yes.</p><h4>The More and the Merrier</h4><p>Let’s get back to choice, for a moment. We already mentioned that choosing is hard, but we need to get more specific.</p><p><em>Which choice is easier, between two or among multiple options?</em> In his book <a href="https://en.wikipedia.org/wiki/The_Paradox_of_Choice">The Paradox of Choice</a> American psychologist Barry Schwartz argues that <strong>more options create more distress</strong>. Fair enough.</p><p>What if our multitude of options becomes <em>an infinity,</em> though? Does having practically infinite options cause bigger distress? Or could it perhaps be <em>the key to freeing oneself</em> from the compulsion to see everything?</p><p>It sounds like a paradox, but think about it: it is easier to complete a choice-based game than an open-world one. Therefore, here’s a theory:</p><blockquote>The more open the world of a game is, the easier it is to let go of seeing Everything in it.</blockquote><p>Then, how about a case where “infinity” isn’t just a figure of speech? In <a href="https://www.nomanssky.com/"><em>No Man’s Sky</em></a><em>,</em> <strong>AI algorithms create content</strong> upon the player’s arrival. Every time we play the game, even in the same location, the content will be different.</p><p>This is a very unexpected interpretation of Antonio Machado’s poem <a href="https://www.favoritepoem.org/poem_CaminanteNoHayCamino.html">Caminante, No Hay Camino</a>:</p><blockquote>Traveller, there is no path.<br>We create the path by walking.</blockquote><p>Do unlimited possibilities <em>really</em> make things more difficult for completionists or could they be part of healing their compulsion? As one <a href="https://xander51.medium.com/i-used-to-be-a-gaming-completionist-91c6e5c58b0a">former gaming completionist</a> confesses:</p><blockquote>No Man’s Sky has a literal endless amount of content to explore… and in a way, that was freeing. There’s a specific ending to the story, sort of, but having an infinite amount of planets to explore meant that my brain stopped caring about it after a while and I could just focus on enjoying the game.</blockquote><p>Perhaps more is indeed less, but perhaps we need to go through unbearably rich quantities of content, before we realise how much we can simply let go of. As William Blake writes in his <em>Marriage of Heaven and Hell:</em></p><blockquote>The road of excess leads to the palace of wisdom.</blockquote><p>Enjoyment of any kind requires some wisdom, after all.</p><h3>Conclusion</h3><p>Like other compulsive behaviours — and regardless of its degree — completionism has deep roots, drawing from our most primal fears, like fear of loss and fear of death. Therefore, it is <strong>not to be lightheartedly dismissed</strong> as some players’ funny attitude towards gaming.</p><p>On the other hand, completionism — like perfectionism and competitiveness — is likely to hinder our gaming enjoyment in some cases.</p><p>The key is letting go of our desire to see everything. Coming to terms with missing out on the road not taken.</p><p>And focusing on the fun found along the taken one.</p><p><em>As stated in the introduction, this article comes with a a little treat: a </em><strong><em>companion game</em></strong><em> I made on </em><a href="https://arcweave.com/"><em>Arcweave</em></a><em>. It is a short prototype featuring a main quest along with a few side-quests.</em></p><figure><img alt="Screenshot from this article’s companion game, showing a martian landscape, the action description, and the player’s choices." src="https://cdn-images-1.medium.com/max/1024/1*trITKOXNLUcaoeEXmNZJpw.png" /><figcaption>No, it’s not Mars. But the illustrations I found for this little game are fantastic. <a href="https://www.freepik.com/free-vector/mars-landscape-red-alien-planet-background-desert-surface-with-mountains-rocks-deep-cleft-stars-shine-green-sky-martian-extraterrestrial-computer-game-backdrop-cartoon-illustration_10798331.htm">This one</a> is also b<em>y </em><a href="https://www.freepik.com/upklyak"><em>upklyak</em></a><em> on Freepik.</em></figcaption></figure><p><em>You can </em><a href="https://arcweave.com/app#/project/oKELJD80W2/play"><em>play it on your browser</em></a><em> for free. If you do, I would love to hear from you — maybe even receive a screenshot of its final screen, showing which quests you followed and which ones you skipped. Did you feel like following all of them?</em></p><p><em>Arcweave makes it very easy to create and run such game prototypes. (You can see this one’s structure </em><a href="https://arcweave.com/app#/project/oKELJD80W2"><em>here</em></a><em>.) If you want to quickly learn how to make them yourself, watch Arcweave’s </em><a href="https://www.youtube.com/watch?v=Dfm6dKQH3I0&amp;list=PLP2s5PcDiBdbJUFiw8gu8gK1IyFboWxFH"><em>basic tutorial series on YouTube</em></a><em>.</em></p><p><a href="https://medium.com/u/e8b6e3737f5a">Giannis</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is content writer in <a href="https://arcweave.com/">Arcweave</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*3lf9Y6mHxoxpSSFOw6gjlw.png" /><figcaption>This story was originally published on <a href="https://www.gamasutra.com/blogs/GiannisGeorgiou/20210716/385232/Fun__Grief_Completionism_in_Games.php">Gamasutra</a>. It has been edited and published at SUPERJUMP with permission.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee00966d1e62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-jump/fun-grief-completionism-in-games-ee00966d1e62">Fun &amp; Grief: Completionism in Games</a> was originally published in <a href="https://medium.com/super-jump">SUPERJUMP</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Start Writing Interactive Fiction]]></title>
            <link>https://medium.com/super-jump/how-to-start-writing-interactive-fiction-65e3ea5b8ad5?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/65e3ea5b8ad5</guid>
            <category><![CDATA[fiction-writing]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[interactive]]></category>
            <category><![CDATA[creator-voice]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Wed, 30 Jun 2021 09:59:30 GMT</pubDate>
            <atom:updated>2021-07-28T09:23:51.475Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7kx9t1lvzqP-0_AhURbVA.png" /></figure><h4>CREATOR VOICE</h4><h4>And why you should—if you want to design games</h4><p><strong>Interactive fiction (IF)—or <em>text adventures—</em>is a category of computer games that communicate with the player through text.</strong> Instead of ultra HD graphics, you get refined descriptions. Instead of using a game controller, you advance by typing commands or clicking on hypertext options.</p><figure><img alt="Screenshot from Infocom’s Enchanter, demonstrating an example of parser interactive fiction, with commands like ‘examine oven,’ ‘light lantern,’ ‘inventory,’ and ‘read spell book.’" src="https://cdn-images-1.medium.com/max/1024/1*3uV_volHL4TuMhkjOQcuhA.jpeg" /><figcaption><em>Excerpt from Infocom’s </em><a href="https://ifdb.org/viewgame?id=vu4xhul3abknifcr"><em>Enchanter</em></a><em> (1983) as played on </em><a href="https://www.electronjs.org/apps/lectrote"><em>Lectrote</em></a><em>, a modern IF interpreter.</em></figcaption></figure><figure><img alt="Screenshot from game ‘Spider and Web’ by Andrew Plotkin." src="https://cdn-images-1.medium.com/max/1024/1*6c1AcecnnPL8To1C2Dju0g.png" /><figcaption><em>An excerpt from the beginning of Andrew Plotkin’s </em><a href="https://www.eblong.com/zarf/zweb/tangle/"><em>Spider and Web</em></a><em> (1998).</em></figcaption></figure><figure><img alt="Screenshot from Emily Short’s ‘Bee.’" src="https://cdn-images-1.medium.com/max/1024/1*9ouy4rtJcWknOmkC9oFoHA.png" /><figcaption><em>The introduction of Emily Short’s </em><a href="http://dendry.github.io/bee/"><em>Bee</em></a><em> (2015).</em></figcaption></figure><p>If you have never played IF, you can visit the <a href="https://pr-if.org/play/">Play</a> section of the <em>People’s Republic of Interactive Fiction</em> website or pick any title from the <a href="https://ifdb.org/viewcomp?id=1lv599reviaxvwo7">Top 50 of All Time</a> list. You will be amazed by the quality of writing and the extents to which this art has developed through the pens-ehm-keyboards of its masters.</p><h3>Why IF</h3><p>So, why would IF be something you might want to get your teeth into? What is so special about an <em>interactive</em> story?</p><p>For the reader, immersing oneself into a piece of interactive fiction is a special experience that <strong>marries reading with playing</strong>. IF works are <em>games</em> and their readers are actually <em>players.</em> While a book can stir its reader’s empathy for its protagonist, an IF game has its reader <em>become</em> the protagonist.</p><p>It’s a <strong>unique experience for the writer</strong>, as well. There is something mischievous about writing a piece readers will have to <em>actively explore.</em> This joy of hiding clues for someone else to discover is unique to game design. (Any parent who has prepped a treasure hunt knows what I mean.)</p><p>And it can be done by <strong>one person</strong>, within a <strong>reasonable amount of time</strong>. While other games require a team juggling multiple departments (script, programming, graphics, animation, sound, and music-and project management for all of the above), interactive fiction relies exclusively on two pillars: <strong>storytelling</strong> and <strong>implementation</strong>. Neither of the two are to be underestimated, but they are not overwhelming.</p><p>Today, it’s <strong>easier than ever</strong> to create a piece of interactive fiction. There are various systems you can work with and a passionate community to offer you advice.</p><p>It’s up to you to take the leap of faith.</p><h3>Write IF</h3><h4>Choose a system</h4><p>Every medium has its particularities and IF is no exception. When writing an interactive story, <strong>the system you use heavily influences the form</strong>. To mention the most famous, systems like <a href="http://inform7.com/">Inform 7</a>, <a href="http://textadventures.co.uk/quest">Quest</a>, <a href="https://www.tads.org/">TADS</a>, and <a href="https://adventuron.io/">Adventuron</a> produce parser games (the ones where you type commands like “TAKE APPLE,” “EAT IT,” etc), while <a href="https://twinery.org/">Twine</a>, <a href="https://inklewriter.com/">InkleWriter</a>, <a href="https://idmillington.github.io/undum/">Undum</a>, and <a href="https://renpy.org/">Ren’Py</a> produce choice-based games.</p><p>Keep in mind that even systems of the same category produce games with considerably different feel and mechanics. To choose among the systems, study each one’s <strong>example games</strong> and <strong>tutorials</strong> and go for whatever inspires your creativity.</p><p>Note: <strong>scripting skills</strong> are another factor; some systems heavily rely on code, while others use visual scripting.</p><figure><img alt="Screenshot from Arcweave’s environment, where player commands like ‘ask the witch about’ several subjects are represented with tree diagrams." src="https://cdn-images-1.medium.com/max/1024/1*B_ZAWZvdOxd4OIlFMYukww.jpeg" /><figcaption><em>Player commands visually represented on Arcweave’s diagrams.</em></figcaption></figure><p>This article’s diagrams are made with <a href="https://arcweave.com/">Arcweave</a>. It is one of the <strong>easiest</strong> and most <strong>writer-friendly apps for visually designing and prototyping games</strong>. You can use it to structure your IF story, regardless of the system you will eventually choose to implement it with.</p><h4>Summon the idea</h4><p><em>Where do ideas come from?</em></p><p>There is no magical answer to this question; only <a href="https://www.masterclass.com/articles/how-to-find-story-ideas-for-your-novel#8-ways-to-get-book-ideas">prompts</a>, some of which you’ve probably heard already: read the papers, eavesdrop on diner conversations, carry a notebook, keep a journal, dig deep into your own psyche, write what you know, write the game you’d want to play, etc.</p><p>And they are all true. There is no wrong way to get ideas.</p><figure><img alt="Screenshot from Arcweave, showing part of a murder mystery plot diagram." src="https://cdn-images-1.medium.com/max/1024/1*GxXMkYks_r-i-Z3uWvBh_Q.jpeg" /><figcaption><em>One of the most beloved genres has always been the murder mystery. Since audiences know its conventions inside-out, the challenge is to give it a fresh spin.</em></figcaption></figure><p>You can also start from the story’s <strong>genre</strong>. Would you like to create a fantasy game like Infocom’s <em>Zork,</em> a murder mystery, a family comedy, an action-adventure, or a psychological horror? Get inspired by stories and authors that you are jealous of.</p><p>Sometimes, the <strong>audience</strong> determines the story’s subject. Is it a game for kids or strictly for adults?</p><p>Whatever the subject, there is one thing to consider: <strong>keep it short and simple</strong>. Since it’s your first game, you don’t want to get overwhelmed and quit. You want to make something that you will <em>finish</em> and-moreover-something that will inspire you to continue making games!</p><h4>Structure the idea</h4><p>Try to summarise your story in one sentence, in regard to <strong>what the protagonist wants</strong>. In essence, this is your story:</p><blockquote><em>A [</em><strong><em>protagonist</em></strong><em>] must [achieve a </em><strong><em>goal</em></strong><em>] or [dire </em><strong><em>consequences</em></strong><em> will befall upon them].</em></blockquote><p>There are more, of course, like character psychology and inner growth, but you will get further by starting from the outer motivation.</p><p>Is your protagonist trapped, hunted, or transformed into a frog? Are they after winning someone’s heart, attention, or approval? Are they a villain themselves, plotting against some unsuspecting NPC?</p><p>What do they want? What happens if they don’t get it? Find that and build your story around that.</p><h4>Skip to the end</h4><p>The beginning is the right time to <strong>think about the ending</strong>-or rather the <em>endings,</em> since IF stories often have multiple outcomes.</p><p>Do you think that’s a jump, going straight to the end? <em>Absolutely.</em></p><p>It is also a quick way to <em>test your story:</em> if you can’t come up with a meaningful and satisfying <strong>climax</strong>, then you should <em>rethink your whole idea.</em> You want your story not only to start well, but also to <strong>end with a grand finale</strong>.</p><p>Moreover, games often have <strong>multiple endings</strong> the player reaches through choosing different paths. Those also have to be meaningful and satisfying.</p><blockquote><em>Take your premise and brainstorm all the possible endings it could have. Then pick the best ones.</em></blockquote><p>And let’s not forget all the horrible death/failure endings that will cause you to <em>RESTORE</em> or <em>RESTART.</em></p><figure><img alt="Screenshot from ‘Anchorhead,’ showing one of the death scenes. The description is ‘With a sudden shriek, an enormous blast of steam erupts from the pipes above your head, engulfing you in a cloud of superheated vapor well in excess of 300 degrees Fahrenheit. The pain is intense but mercifully brief as your skin scalds instantly and peels from your body like cheap wallpaper. You have died.”" src="https://cdn-images-1.medium.com/max/1024/1*de6XyQXnaQKdZ5Ume3cj7Q.png" /><figcaption><em>One of the innumerable and excruciatingly painful deaths scenes in Michael Gentry’s </em><a href="http://pr-if.org/play/anchorhead/"><em>Anchorhead</em></a><em> (1998).</em></figcaption></figure><h4>Outline it</h4><p>The end doesn’t justify the means. After picking your endings, you need to <strong>reverse-engineer the middle</strong>: what player decisions could push the story towards one ending or another?</p><p>Create a rough sketch with pencil on graph paper. Don’t worry about making a mess. At this stage, your brain <em>needs</em> making a mess.</p><figure><img alt="Photo of a flowchart made with pencil on graph paper." src="https://cdn-images-1.medium.com/max/1024/1*_VigfhwwlhKuJViSGMDHRg.jpeg" /><figcaption><em>Pencil first! Take a break from the screen. Create a mess and clean it up later. (Photo by the author.)</em></figcaption></figure><p>You can <strong>edit</strong> and <strong>refine your diagrams</strong> on any flowchart-creating software. If you use Arcweave …</p><figure><img alt="Screenshot of a plot flowchart on Arcweave." src="https://cdn-images-1.medium.com/max/1024/1*RDCujtaY56BUU34vspTjOQ.jpeg" /><figcaption><em>Refining your plot diagram on Arcweave.</em></figcaption></figure><p>… you can actually <strong>make your outline interactive</strong> and run it on its <em>play mode:</em></p><figure><img alt="Screenshot from Arcweave’s play mode function." src="https://cdn-images-1.medium.com/max/1024/1*ctl4iXHHL0o7TkApARy5Gw.jpeg" /><figcaption><em>The “Suspects” element from the example above, as rendered on Arcweave’s play mode.</em></figcaption></figure><h4>Puzzles or no puzzles</h4><p>Back in the days of Infocom, people paid good money to buy text adventures, so games had to be <em>hard</em> to beat. (Infocom’s <a href="https://ifdb.org/viewgame?id=ouv80gvsl32xlion"><em>Hitchhiker’s Guide to the Galaxy</em></a> cost almost $40 in 1984, the year of its release. That’s more than $100, today!) Having tough puzzles and labyrinths was part of the deal.</p><p>Today, <strong>interactive fiction doesn’t have to be puzzle-heavy</strong>. On the contrary, making impossible puzzles can be off-putting for many people. Players enjoy the story more than anything else, asking for well-shaped characters, world consistency, and original points of view.</p><p>Having said that, a few good puzzles never hurt anybody. In a very short game, you hardly need more than a couple of them. Just make sure <strong>they fit the narrative</strong>.</p><h4>Write the walkthrough</h4><p>An enjoyable way to start with the story is to <strong>write a walkthrough mockup</strong>, simulating what the player will experience when playing the final game.</p><p>For example, in a parser game walkthrough, you would write player commands and parser responses. In theory, the player can try anything, so the more responses you predict (and default responses you avoid), the more enjoyable the game will be:</p><pre>&gt; SEARCH CHEST<br>In the old chest, you find a scroll!</pre><pre>&gt; EXAMINE SCROLL<br>An old parchment, reeking of magic.</pre><pre>&gt; EAT SCROLL<br>You absent-mindedly bite on the scroll... Then, you reconsider. What if you transform into something?</pre><p>In a choice-based game, the player has specific options to choose from, so you can simply write those and pretend you follow one of them:</p><pre>You continue digging, until your shovel hits wood.</pre><pre>- TRY BREAKING THE WOODEN SURFACE<br>- EXIT THE GRAVE</pre><pre>&gt; EXIT THE GRAVE<br>&quot;Sod it,&quot; you tell yourself and start clawing on the moist walls of earth that surround you, trying to get back to the surface.</pre><h4>Implement it</h4><p>If you have programming skills, you probably already know which way to look for your <strong>scripting language</strong> of choice. If you don’t, you should look for <strong>visual tools</strong> to help you.</p><p>All you need to start with is an app that visually represents the <strong>plot’s flow</strong>, produces <strong>options</strong> for the player, assigns &amp; checks variable values.</p><p>For example, let’s say the player starts in a locked room. They can try opening the door or they can search the mattress:</p><pre>* OPEN THE DOOR → CHECK: does the player have the HAIRPIN?<br>    * RESULT: YES → OK, then, the door opens → Next Section<br>    * RESULT: NO → The door remains closed → Back to Start</pre><pre>* SEARCH THE MATTRESS → You find a HAIRPIN.</pre><p>For the game to store the information that the player has the hairpin or not, it uses a variable, e.g. has_hairpin.</p><p>Here is how we can visually design this short scene in a diagram:</p><figure><img alt="Screenshot of plot’s flowchart from Arcweave." src="https://cdn-images-1.medium.com/max/1024/1*guKGwhrrD9Pxnf9jp9lf5g.jpeg" /><figcaption><em>On Arcweave, conditional (if/else) statements get their own diagram nodes, called “branches.”</em></figcaption></figure><p>The options available to the player depend on the value of the has_hairpin variable. For example, the player gets the option to search the mattress only if they don&#39;t have the hairpin, that is if has_hairpin == false, which is the same with not has_hairpin == true.</p><p>After finding the hairpin or failing to open the door, the game returns to the initial element, titled <strong>Start: Cell</strong>. Otherwise, the game allows the player to proceed to the next section, titled <strong>Corridor</strong>.</p><p>This was an example of a simple puzzle implementation. You can use similar logic to create all your game’s scenes, puzzles, or dialogue trees.</p><h3>Share your work</h3><h4>Test it</h4><p>As its writer, you are also the game’s first <em>playtester.</em> A word of warning: however conscientious they may be, <em>your testing efforts will never be enough.</em> You have to <strong>let other people test your game</strong> before you officially release it. “Other people” may include friends and family, but their input-bless them-probably won’t be enough, either.</p><blockquote><em>For testing, you have to stick your head out. Show your work to people who know about the game-design process and its pitfalls, aka </em>bugs.</blockquote><p>The <a href="https://intfiction.org/">Interactive Fiction Community Forum</a> has a specific <a href="https://intfiction.org/c/playing/beta-testing/">room</a> where you can <strong>seek out playtesters</strong>. Start a new thread and briefly describe your game. Then, contact those interested with a private message, sending them the game file or a confidential link, to play it online.</p><p>Don’t be shy; the community is very supportive to everyone, regardless of their level of experience. Be nice to people and give back from your own experience, when you have some.</p><h4>Publish it</h4><p>When you’ve thoroughly tested it, you can <strong>publish your game</strong> on <a href="https://itch.io/">itch.io</a>, your website, social media, or the IF Community Forum.</p><p>Before you open your game to the public, though, take a deep breath. If you receive good feedback during the testing, you may consider submitting your game to one of the several <strong>annual competitions</strong> for IF works. And there are <a href="https://ifdb.org/search?browse&amp;comp">plenty</a> of them.</p><p>The <strong>IF community</strong> is world-wide and buzzing. If you get hooked with IF, you will find that engaging with its community as a player, tester, or writer is a deeply rewarding experience.</p><h3>Conclusion</h3><p>Writing interactive fiction is a unique and satisfying process. It requires a lot of care and attention, as well as testing and rewriting- <em>but what kind of writing doesn’t?</em></p><p>With its particularities, it can be a <strong>powerful means of self-expression</strong>. For many, it’s a passionate hobby. For some, it has even led to careers in the game industry.</p><p>If you haven’t tried writing IF before, who knows? Maybe it unlocks a door inside you that you didn’t know existed.</p><p>And who knows what awaits to come out…</p><figure><img alt="Photo of a wooden door in a stone wall." src="https://cdn-images-1.medium.com/max/1024/1*zJPLQkxqmhP5yE6p0p0zWw.jpeg" /><figcaption><em>A Zork-ish door by </em><a href="https://pixabay.com/users/marcoreyes-311929/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=782650"><em>Marco Antonio Reyes</em></a><em> from </em><a href="https://pixabay.com/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=782650"><em>Pixabay</em></a><em> (with shadows added by the author, for zorkification effect).</em></figcaption></figure><h3>Further material</h3><p>For more information on interactive fiction, you can dig deeper towards various directions. Here are only a few that you can start from:</p><p><a href="https://www.youtube.com/watch?v=GifZWBxBDn8"><em>Gameshelf’s</em></a> episode on Modern Interactive Fiction, by and with Jason McIntosh.</p><p><em>Get Lamp,</em> a 90-minute documentary by Jason Scott, currently found on this <a href="https://www.youtube.com/watch?v=LRhbcDzbGSU&amp;t=455s">semi-unofficial YouTube link</a>.</p><p><a href="https://emshort.blog/how-to-play/writing-if/">Writing IF</a>, by Emily Short.</p><p><a href="https://ifdb.org/">IFDB</a>: the Interactive Fiction DataBase.</p><p><a href="https://medium.com/u/e8b6e3737f5a">Giannis G. Georgiou</a> is a writer and story consultant focusing on subjects of narrative structure, theory, and technique. He is Content Writer and Creator in <a href="https://arcweave.com/">Arcweave</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*3lf9Y6mHxoxpSSFOw6gjlw.png" /><figcaption><em>Originally published at </em><a href="http://www.gamasutra.com/"><em>Gamasutra</em></a><em>. Edited and re-published at SUPERJUMP with permission.</em></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65e3ea5b8ad5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/super-jump/how-to-start-writing-interactive-fiction-65e3ea5b8ad5">How to Start Writing Interactive Fiction</a> was originally published in <a href="https://medium.com/super-jump">SUPERJUMP</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a Text Adventure Game Inventory in JavaScript]]></title>
            <link>https://medium.com/swlh/how-to-create-a-text-adventure-game-inventory-in-javascript-507934d0dbb9?source=rss-e8b6e3737f5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/507934d0dbb9</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[adventure]]></category>
            <dc:creator><![CDATA[Giannis G. Georgiou]]></dc:creator>
            <pubDate>Mon, 18 May 2020 11:16:49 GMT</pubDate>
            <atom:updated>2020-05-18T21:30:49.489Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQTTQd_zHdkEgRw7-aTHag.png" /><figcaption>Image by <a href="https://pixabay.com/users/263582-263582/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=940706">Giacomo Zanni</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=940706">Pixabay</a></figcaption></figure><h4>Use class inheritance to define and describe game items in an interactive fiction premise</h4><p><a href="http://inform7.com/">Inform 7</a> was where I started coding. I learned the most fundamental concepts of programming by building interactive fiction exercises. <em>For loops, ifs, </em>and <em>variables</em>—they were all right there, at the core of those games. So where <em>objects, classes, </em>and<em> subclasses.</em></p><p>I love sharing as I learn, especially through stimulating and playful examples. While teaching myself JavaScript, as soon as I learned about <strong>ES6 classes and inheritance</strong>, I thought of Inform’s object oriented programming and its <em>kinds</em>—that’s how classes are called in I7. And the question came naturally:</p><blockquote>How can I simulate an adventure game’s inventory of items and descriptions, using JavaScript?</blockquote><h3>Overview</h3><p>Let’s program some game items and a simple inventory, using JS objects and inheritance.</p><p>Specifically, we’ll create an <strong>Item</strong> parent class, which has two properties: a <em>name</em> and a <em>state</em>. The state property is an integer describing whether the item:</p><p><strong>0</strong>: is out-of-play (destroyed or not yet introduced)<br><strong>1</strong>: is somewhere in the game world, but not yet found by the player<br><strong>2</strong>: has been handled by the player—e.g. taken and then dropped<br><strong>3</strong>: is carried by the player.</p><p>This obviously is an improvised—and arbitrary—system and it may not fully suit a real game, but you can tailor it to your own game’s needs.</p><p>Then, we will create two subclasses, <strong>Weapon</strong> and <strong>Wallet</strong>, which will inherit the Item’s properties of name and state. Moreover, the Weapon class will also have a <em>damage</em> factor and the Wallet class will have the <em>amount of money</em> it contains.</p><p>Finally, we will create a console log that gives a detailed report about all the items we’ve created.</p><p>So, let’s go!</p><h3>The Code</h3><h4>Creating the Classes</h4><p>We start our code with the Item class:</p><pre>class Item {<br>    constructor(nam, stat) {<br>        this.name = nam;<br>        this.state = stat;<br>    }<br>};</pre><p>People usually write constructor (name, age, email)and then use the same words for the &quot;this&quot; declaration, as in: this.name = name; this.age = age; etc.</p><p>I am a noob and I need to see which word corresponds to what. Therefore, until I get more confident, I will prefer differentiating the arguments passed to a function from the property names.</p><p>After the Item, let’s create the subclasses. We use the <strong>extend</strong> keyword to declare that the Weapon and Wallet are subclasses of Item:</p><pre>class Weapon extends Item {<br>    constructor(nme, dmg, stt) {<br>        super(nme, stt);<br>        this.damage = dmg;<br>    }<br>};<br><br>class Wallet extends Item {<br>    constructor(nme, gld, slv, cpr, stt) {<br>        super(nme, stt);<br>        this.gold = gld;<br>        this.silver = slv;<br>        this.copper = cpr;<br>    }<br>};</pre><p>Notice that the Weapon class has the <em>damage</em> property, while the Wallet class has <em>gold</em>, <em>silver</em>, and <em>copper</em> coin properties. (Some or all of them can be zero, of course.)</p><p>Also, notice the use of <strong>super()</strong> and its arguments. Super() refers to the parent class of Item. The arguments we feed super() in Weapon or Wallet, are fed to the Item. The line:</p><pre>constructor(nme, dmg, stt) {<br>        super(nme, stt);</pre><p>can be interpreted as “to make this object, I will give you 3 values, but 2 of them are to be passed to the parent class.”</p><p>Isn’t inheritance wonderful?</p><h4>Creating the Actual Objects</h4><p>Using the classes we’ve made, let’s create some items for the game world:</p><pre>var worldStuff = [<br>    sword = new Weapon (&quot;two-handed sword&quot;, 5, 1),<br>    axe = new Weapon (&quot;battle axe&quot;, 4, 2),<br>    pouch = new Wallet (&quot;leather pouch&quot;, 1, 0, 1, 3),<br>    liquorice = new Item (&quot;liquorice&quot;, 0),<br>    helmet = new Item (&quot;rusty helmet&quot;, 3),<br>    boots = new Item (&quot;snake-skin boots&quot;, 3)<br>];<br><br>sword.description = &quot;Everything a great warrior needs. Or is it &#39;a great worrier?&#39;&quot;;<br>axe.description = &quot;A double axe with iron blades and a wooden handle.&quot;;<br>pouch.description = &quot;Your father&#39;s pouch, made of Spanish leather.&quot;;<br>liquorice.description = &quot;A half-eaten piece of liquorice.&quot;;<br>helmet.description = &quot;Why do you keep stuff like that anyway?&quot;;<br>boots.description = &quot;Made of real anaconda skin—or so said the merchant.&quot;;</pre><p>Not to overload the constructors with parameters, I left the descriptions to be filled-in independently, after the new objects declaration.</p><p>If you get confused with which number corresponds to which parameter, just go back to the classes declaration and look at the arguments in the parentheses. For example, the sword object has the name “two-handed sword,” damage: 3, and state: 1 (meaning it’s somewhere in the game world).</p><p>I put all the items in an array called <strong>worldStuff</strong>, just to have them all together. I can also create an <strong>inventory</strong> array that will contain all the names of the carried items:</p><pre>var inventory = [];<br><br>for (let i of worldStuff) {<br>    if (i.state === 3) {<br>        inventory.push(i.name);<br>    }<br>};<br><br>console.log(inventory);</pre><p>The <em>for</em> loop runs through all the items in the worldStuff array and adds the once carried (having a state of 3) to the inventory array, using the <strong>push()</strong> method.</p><p>The inventory array may contain the objects themselves—and not just the names. It depends on how you want to deal with the items in the context of a real game. For the sake of our example, we’ll just leave it as it is.</p><h4>Dealing With Money</h4><p>The leather pouch’s description does not include the amount of money it contains. To have the game report the amount of coins to the player, we will create a specific function:</p><pre>function countMoney(obj) {<br>    let reply = `Your ${obj.name} contains `;<br>    if (obj.gold) {<br>        reply = reply + `${obj.gold} gold`;<br>        if (obj.silver &amp;&amp; obj.copper) {<br>            reply = reply + &quot;, &quot;;<br>        } else if (obj.copper || obj.silver) {<br>            reply = reply + &quot; and &quot;;<br>        };<br>    };<br>    if (obj.silver) {<br>        reply = reply + `${obj.silver} silver`;<br>        if (obj.gold &amp;&amp; obj.copper) {<br>            reply = reply + &quot;, and &quot;;<br>        } else if (obj.copper) {<br>            reply = reply + &quot; and &quot;<br>        };<br>    };<br>    if (obj.copper) {<br>        reply = reply + `${obj.copper} copper`<br>    };<br>    if (!obj.gold &amp;&amp; !obj.silver &amp;&amp; !obj.copper) {<br>        reply = reply + &quot;no&quot;;<br>    };<br>    reply = reply + &quot; coin&quot;<br>    if (obj.copper &gt; 1 || (obj.copper === 0 &amp;&amp; obj.silver &gt; 1) || (obj.copper === 0 &amp;&amp; obj.silver === 0 &amp;&amp; obj.gold &gt; 1) || (!obj.gold &amp;&amp; !obj.silver &amp;&amp; !obj.copper)) {<br>        reply = reply + &quot;s&quot;<br>    };<br>    reply = reply + &quot;.&quot;<br>    console.log(reply);<br>};</pre><p>Don’t be overwhelmed by the length of this function. The reason it’s so long is the variety of cases that it gets to deal with. For example:</p><p><em>&gt; Your leather pouch contains 1 gold, 4 silver, and 1 copper coin.<br>&gt; Your leather pouch contains 1 gold coin.<br>&gt; Your leather pouch contains 1 gold, 4 silver, and 2 copper coins.<br>&gt; Your leather pouch contains 1 gold and 1 copper coin.<br>etc.</em></p><p><strong>The logic behind it:</strong></p><p>We start a string (called reply) and add to it, step by step, as we check for gold, silver, and copper. In this explanation, I have noted the spaces with underscores for the sake of clarity:</p><p>(<strong>1</strong>) Start of the reply: Your_pouch_contains_...</p><p>(<strong>2.1</strong>) We check for gold. If there are any gold coins, we add … (number)_gold... to the string of our reply.</p><p>(<strong>2.2</strong>) Taking the gold as a given, we also check for silver and copper. If there is only one of those two, we add … _and... If there are all three kinds of coins, we continue with a ... ,_...</p><p>(<strong>3.1</strong>) We check for silver. If yes, we add … (number)_silver...</p><p>(<strong>3.2</strong>) In the same way, with silver as a given, we check for the rest. If there is also gold <em>and </em>copper, we add …,_and_...—to use the Oxford comma. Otherwise, just ..._and_...</p><p>(<strong>4</strong>) Copper is next. If there is copper, we add … (number)_copper... to the string of our reply.</p><p>(<strong>5</strong>) Let’s not forget the case of no coins at all, to which we add … no... to our reply.</p><p>Then, we add the word coin, singular, along with an <em>if</em> clause including all the cases that it will require an additional s, for plural. That&#39;s when the last mentioned kind has a plural amount of coins:</p><p>(<strong>5.1</strong>) if there is more than one copper coin or<br>(<strong>5.2</strong>) if there is no copper and there is more than one silver coin or<br>(<strong>5.3</strong>) if there is no copper or silver and there is more than one gold coin or<br>(<strong>5.4</strong>) if there are no coins at all.</p><p>(<strong>6</strong>) Finally, we add the sentence’s . period. Phew!</p><p>We need to <em>be careful with the spaces.</em> Running a few tests with different amounts can help spot missing or double spaces, fixing any mistakes.</p><p>I admit that the Oxford comma makes things a little more complicated, but a little bit of style never hurt anybody. Try changing the coin amounts to see different results.</p><h4>Examining the Items</h4><p>We can now create a function that takes an object as an argument and returns the item’s description, the damage it causes (if a weapon), and the amount of coins it contains (if a wallet).</p><p>Of course, in a real game, there would be issues of <em>scope</em> (whether the item is visible, reachable, etc). For the sake of this example we will “examine” even the items that aren’t in the game world (state: 0).</p><p>To see if the item is a weapon, we include an <em>if</em> conditional that checks whether “damage” is one of the object’s properties. If true, we get a report on the amount of damage it can do.</p><p>To deal with the states, we use the <strong>switch</strong> statement for the various values state can take.</p><pre>function examineItem(obj) {<br>    console.log(obj.name.toUpperCase());<br>    console.log(obj.description);<br>    if (&quot;damage&quot; in obj) {<br>        console.log(`The ${obj.name} can cause ${obj.damage} points of damage.`);<br>    };<br>    switch (obj.state) {<br>        case 0:<br>            console.log(`The ${obj.name} has been destroyed (or not appeared in the game yet).`);<br>            break;<br>        case 1:<br>            console.log(`The ${obj.name} is somewhere in the game world, but you haven&#39;t found it, yet.`);<br>            break;<br>        case 2:<br>            console.log(`You have handled (but are not carrying) the ${obj.name}.`);<br>            break;<br>        case 3:<br>            console.log(`You are carrying the ${obj.name}.`);<br>            break;<br>        default:<br>            console.log(`You have no idea what the state of the ${obj.name} is.`);<br>    };<br>    if (&quot;copper&quot; in obj) {<br>        countMoney(obj);<br>    };<br>};</pre><p>To see if the item contains money, it’s enough to check if it contains only one of the “copper,” “silver,” or “gold” properties.</p><p>So all that’s left now is to run the examining function for several objects:</p><pre>examineItem(sword);<br>examineItem(axe);<br>examineItem(pouch);<br>examineItem(liquorice);<br>examineItem(helmet);<br>examineItem(boots);</pre><p>We get:</p><blockquote>TWO-HANDED SWORD<br>Everything a great warrior needs. Or is it ‘a great worrier?’<br>The two-handed sword can cause 5 points of damage.<br>The two-handed sword is somewhere in the game world, but you haven’t found it, yet.</blockquote><blockquote>BATTLE AXE<br>A double axe with iron blades and a wooden handle.<br>The battle axe can cause 4 points of damage.<br>You have handled (but are not carrying) the battle axe.</blockquote><blockquote>LEATHER POUCH<br>Your father’s pouch, made of Spanish leather.<br>You are carrying the leather pouch.<br>Your leather pouch contains 1 gold and 1 copper coin.</blockquote><blockquote>LIQUORICE<br>A half-eaten piece of liquorice.<br>The liquorice has been destroyed (or not appeared in the game yet).</blockquote><blockquote>RUSTY HELMET<br>Why do you keep stuff like that anyway?<br>You are carrying the rusty helmet.</blockquote><blockquote>SNAKE-SKIN BOOTS<br>Made of real anaconda skin — or so said the merchant.<br>You are carrying the snake-skin boots.</blockquote><h3>Backstage and Trivia</h3><h4>Dealing With Money</h4><p>At first, I tried to express money as a <em>float</em>, from which the integer part would represent the silver and the decimal one the copper.</p><p>A couple of problems, though. First, it isn’t possible to have 3 kinds of coins, gold, silver, and copper.</p><p>Second, separating the decimal part from the integer part is tricky. It requires the <strong>Math.floor()</strong> method and I couldn’t really understand why it gave me some of the results it gave me.</p><p>The other idea was to declare money as a string that contains the actual units of gold, silver, and copper coins, as in: <em>“23g145s0c.”</em></p><p>It didn’t take me long to realise that having three properties (this.gold, this.silver, and this.copper) was the simplest solution.</p><h4>Dealing With Subclasses’ Arguments</h4><p>Until recently, I didn’t know how to pass arguments from the child to the parent class.</p><p><a href="https://medium.com/u/cbf55ac0cffc">Maciej Rzepiński</a>’s article <a href="https://medium.com/ecmascript-2015/es6-classes-and-inheritance-607804080906"><em>ES6 — classes and inheritance</em></a> had the answer: whatever arguments are to be passed to the parent, we have to put in the parentheses of <strong>super()</strong>, as we did above:</p><pre>class Weapon extends Item {<br>    constructor(nme, dmg, stt) {<br>        super(nme, stt);<br>        this.damage = dmg;<br>    }<br>};</pre><p>Therefore, the subclass constructor parentheses include all the arguments we want to pass in the subclass. Those not in the <em>super()</em> method, we can define through the <em>this</em> keyword, as usual.</p><h3>Conclusion</h3><p>I hope you found this example helpful and inspiring. Do you have any good suggestions for making things more efficient? Did I miss something obvious to you?</p><p>Educate me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=507934d0dbb9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/how-to-create-a-text-adventure-game-inventory-in-javascript-507934d0dbb9">How to Create a Text Adventure Game Inventory in JavaScript</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>