Update (23 Oct 2023): As mentioned in a post below, I accepted an emergency-hire position right after this thread started and then finished my dissertation in early 2023. I’m slowly, after nearly a year, getting back into Twine work. I should, I hope, be back to Snowman work in a couple weeks.
Update (27 July 2022): After taking some feedback and concerns from existing authors using Snowman into consideration, the next version of Snowman will be 3.0 and not 2.2. There will still be a number of breaking changes between major versions, but these should not affect those who may want to stay with the 2.X branch.
After nearly three years of me dealing with a toxic work environment overlapping with COVID-19 issues, I am thrilled to announce Snowman 2.2 is now in a public preview!
Major Changes:
-
Sidebar: Snowman 2.2 now has support for a sidebar using the
<tw-sidebar>
element based on how Harlowe handles the same Twine 2 HTML element. It supports “undo” and “redo” user interactions with icons and story events. A reader can now “rewind” to the beginning of a story or to a previous navigated to passage and “redo” interactions again. This support is built into not only the history of the story, passages visited by a reader, but also a new global store,s
, for authors to use. -
State Management: Instead of asking authors to define an empty object as part of
window.story.state
, as some earlier versions did, Snowman 2.2 has a special proxied pseudo-global property,s
. This is connected to a new state management system where the state of the story is constantly tracked, mirroring functionality present in other story formats. Each story navigation event generates a copy of the current state, allowing a reader to navigate backward and forward in not only the passages visited, but any associated values changed during those visits as well. -
Event-Based Design: Most functionality now passes through an event-based state management system. Story events no longer generate browser events on
window
, as was the case with Snowman 2.0, but use an internal event emitter available to authors namedState.events
. This allows for an author to listen for events such as the story starting,start
, or when a reader clicks on the icons associated with undo and redo functionality,undo
andredo
. -
Storylets: Storylets are an approach to narrative planning where different parts of a story are divided up and become available to be played next based on changes to values during a reader’s interactions with the story. Snowman 2.2 now supports storylets using the passage tag ‘storylet’ and the special element
<requirements>
within the content of a passage. This mirrors the same approach the Harlowe story format took where passages are pre-processed when a certain macro is used within then. In Snowman 2.2, this is based on the passage tag ‘storylet’, which flags the passage for special processing. -
Removed Markdown Support: Various markup for styling a passage and generating HTML to present text content was supported up to Snowman 2.0.3. However, because of assumptions all Markdown processing libraries make about documents, this would often cause major problems and could produce non-standard HTML when the contents of one passage was included in another. In Snowman 2.2, nearly all Markdown support is gone outside of the Twine 2 standard of using double square brackets,
[[
and]]
for links between passages. Authors are strongly encouraged to use HTML to structure content in passages. -
Moving away from Underscore: To maintain compatibility with past versions of Snowman, the library Underscore is still included. However, the handling of template code is now processed by EJS, a project under much more active development and usage. Template tag usage is now flipped: unescaped content should use
<%- ... %>
and escaped content use<%= ... %>
. -
Pseudo-Global Functions: In Snowman 2.0.3, multiple global functions were added to
window
. This is generally a poor pattern for any JavaScript libraries. In Snowman 2.2, template code now have access to a large number of pseudo-global functions passed into the rendering of template tags. These includeStory.include(passageName)
for including the content of one passage in another and access toHistory.hasVisited(passageName)
for testing if a reader has visited a passage yet or not. Authors can also show or hide the new sidebar,Sidebar.show()
andSidebar.hide()
, or put up a loading screen while data is being processed,Screen.lock()
andScreen.unlock()
. -
Extensive Testing: While Snowman 2.0.3 had a large number of unit tests, Snowman 2.2 now has hundreds of individual tests. Snowman 2.2 now tests against 47 entries from the Twine Cookbook. Of the 49 examples sets total in the Twine Cookbook, Snowman 2.2 does not have functionality for only two things: “Templates” (exclusive to SugarCube) and “Using Add-ons” (exclusive to SugarCube).
If you are interested in trying Snowman 2.2, it can be found here:
Format link: https://videlais.github.io/snowman/builds/2.2/format.js
Currently, the Snowman documentation does not cover Snowman 2.2. I no longer have access to the original source code of the documentation and the open source project used to generate it, GitBook, is no longer being maintained. The next major part of working on Snowman 2.2 will be re-generating the documentation and then creating around 12 new entries for the Twine Cookbook in the coming weeks.