iftechfoundation / twine-cookbook

Twine Cookbook
130 stars 31 forks source link

Timed passages #3

Closed klembot closed 6 years ago

klembot commented 7 years ago

The player has a certain amount of time to click a link in a passage, or else they're automatically taken to another one. (c.f. Queers in Love at the End of the World).

videlais commented 7 years ago

Examples submitted for Harlowe 2.0 and SugarCube 2.18. (https://github.com/iftechfoundation/twine-cookbook/tree/master/timedpassages_videlais)

greyelf commented 7 years ago

I wonder if the initialisation of the timer variable should be done within a startup tagged special passage in the Halowe example and a StoryInit special passage in the SugarCube example, instead on the story's main passage.

In the Harlowe case you will need to use some CSS targeting the relevant tw-include to suppress the visual output of the startup tagged passage.

tw-include[type="startup"]{
    display: none;
}

... I wonder if the hiding of the visual output of a startup tagged special passage should be it's own recipe?

videlais commented 7 years ago

That's a good point, @greyelf. I've just updated the Harlowe and SugarCube examples to use the startup tag and StoryInit passage as per your suggestions. I also added --

tw-sidebar { display:none; }

-- to the Harlowe example and --

<<script>> UIBar.destroy(); <</script>>

-- to the SuagrCube one to bring it more closely aligned with Anna Anthropy's original ideas of not being able to 'undo' or 'go back' once the timer runs out.

As for hiding the visual output of the startup tagged special passage being a recipe, I'm not sure. I can see it being useful, but I can also imagine, in the words of another, that it might be a "toy" too. Maybe we highlight it as part of examples like this to make sure it is covered somewhere?

greyelf commented 7 years ago

The Startup passage in the Harlowe example doesn't need the Collapsing Whitespace Markup because it's visual output is suppressed by the related CSS rule.

videlais commented 7 years ago

True, @greyelf. Now fixed in both example and twee notation files.

tmedwards commented 7 years ago

Commentary on the SugarCube example

I'd strongly suggest placing special passages at the top (e.g. place StoryInit near StoryTitle) in the Twee examples. If they're exports from Twine 2 and you don't want to manually clean them up, I'd suggest Tweego or one of the other Twee compilers which are interoperable with Twine 2. (aside: Since Tweego is interoperable with both Twine 2 & 1, save for .tws files (because pickles), and it's a single static binary, it's not a bad idea to have it in your toolbox, period)

Please, do not place <<script>> macros in StoryInit unless somehow absolutely necessary. The proper place for initial JavaScript is the Story JavaScript or a script-tagged passage (when compiling to Twine 2 or Twine 1 story formats, respectively). This is largely true for any story format.

I'm not thrilled about the use of <<display>>, as it's been replaced by <<include>>. At this time, however, its use may be for the best. Preferably, I'd prefer to see <<include>> used with a note that <<display>> may be needed for older versions, but I'm not super adamant about that.

Calling UIbar.destroy() removes the UI bar for no good purpose here. Removing it neither hinders nor reduces the history and removes the other UI elements and controls provided by it. If you want to limit the history, then you should do that via the Config.history.maxStates. For example: (goes in Story JavaScript or a script-tagged passage)

/* Limit the history to a single state (no do overs). */
Config.history.maxStates = 1;

See Also

You can do something very similar to this, and much more simply, with the time() function (on point example at the link), though it does require additional player interaction.

[Edit] Commentary on the Harlowe example

Similar to the complaint about removing SugarCube's UI bar, you don't need to remove Harlowe's entire sidebar to remove its history controls. For example, the following style should do so:

tw-sidebar .undo, tw-sidebar .redo {
    display: none;
}

There are other ways to do that, but being specific is better I think.

videlais commented 7 years ago

I'd strongly suggest placing special passages at the top (e.g. place StoryInit near StoryTitle) in the Twee examples. If they're exports from Twine 2 and you don't want to manually clean them up, I'd suggest Tweego or one of the other Twee compilers which are interoperable with Twine 2. (aside: Since Tweego is interoperable with both Twine 2 & 1, save for .tws files (because pickles), and it's a single static binary, it's not a bad idea to have it in your toolbox, period)

I played with Tweego some just now and found it more work than I wanted to take on to simply export passages in a slightly different order than how Twine 1's export or the Entweedle story format for Twine 2 does. If this becomes an issue depending on how and what other people submit to this project, it might be worth adding it to the workflow for filling out each recipe.

If you feel it would improve readability, I encourage you to change the ordering. We are still settling into a standard way to do things on this. If this helps other people, I'd be happy to adjust things or step aside in order to improve future readability.

Please, do not place < Githubissues.

  • Githubissues is a development platform for aggregating issues.