6 Cleaning Up

As your story gets more complex, it can get harder to arrange and edit your passages. You can preserve your sanity with the following techniques.

1. Create Re-Usable MixIn Passages

If you put an & before a link code in your passage, it will load all the resources, scripts, and further items in the linked passage into the current one and mix them together, thus allowing sharing and reuse of content between passages:

&[[PassageToMixIn]]
Note that PassageToMixIn must be a regular scene passage, not 'textPanel', <htmlPanel> , or %codePanel% passages, although it can, itself, contain links to such passages, to be mixed-in to the main scene.

You can put the same code in multiple passages so that they all mix in the same content from PassageToMixIn. (The name PassageToMixIn is just a placeholder in this example, of course. You can name mixin passages with any title.)

This is useful if you have some common elements that you want to share between a whole bunch of passages, like a common background image or ‘homepage’ button. It saves you time in that you don’t have to copy and paste all that code everywhere, and if you want to make a change to the common items, you can change them in one place, and the changes will be automatically be reflected in any passages that use the mixed in one.

Careful planning, using mixed-in passages, can make a complex story a lot more maintainable.

2. Hiding Link Arrows in the Twine Editor

If you start re-using lots of text passages and mixin passages in many different places in your story, you’ll find that Twine starts to display a nest of link arrows everywhere. You can hide them with the ; character:

[[LinkToPassage]] <% // shows a link arrow in Twine %>
[;[LinkToPassage]] <% // same, but hides the link arrow in twine %>
<% // works for other passages types %>
[;['TextPassage']]
[;[<HTMLPassage>]]
[;[%codePassage%]]

3. Use a Proofing Copy

A productive way to organize your time can be to separate the task of authoring your narrative from the task of gathering and uploading media, like background images. You can use placeholder links or text and then later replace them with links to media when it’s ready and has been deployed to an external server.

Twine can create a Proofing Copy version of your story. To access this feature, click the story title menu, then click View Proofing Copy.

You can use this as a kind of “shopping list” for the media you need for your story. Maybe print it out and use it as a shot list, if you are taking a 360 camera out to gather images.

It also makes it easier to double check all the text passages in your story for mistakes.

4. Share Your Story

When you are finished, you can share your story by exporting a finished HTML file.

Click the story title, and select Publish To File. This will build a single HTML file containing your entire story, including the reach runtime.

(Except media, like images, sounds or videos, will still be hosted on external servers).

Your published HTML file can also be re-imported back into Twine. You can use this published file as a way to collaborate with others.

 


License

Guide to Reach Copyright © by Michael Spears. All Rights Reserved.

Share This Book