Monday 28 April 2014

Version 0.3 Released

If you have already started using StoryTeller this update will definitely break your stories. However, the changes required to fix them are simple.

Pages are no longer specified with class="page" and id="{pageId}". Now only a single attribute is needed data-page-id="{pageId}". Any div with this attribute will be recognised as a page.

Simliarly, class="storyteller" will no longer work. The equivalent is data-viewport-id="main".

New Features:

  • List functions
  • Multiple viewports


Tuesday 22 April 2014

Version 0.21 Released

I made an executive decision and removed the @(...) notation for lists so that I can use the @ symbol as a projection operator.

Just to limit the amount of time v0.2 is left in the wild with the old notation, I've released a minor update.

This update only includes 2 changes:

  1. The @(...) list notation has been replaced with {...} (curly brackets)
  2. The projection operator (see the documentation for lists) 

Re-purposing the @ operator

I'm currently adding a "projection" operator to work with lists. I will allow you to extract a single item from the list (like retrieving a value from an array by its index) or a subset of the items.

I'm considering using the @ symbol for this because it is read as "at". It would sort-of make sense ('a','b','c','d','e')@3 could be read as ('a','b','c','d','e') at index 3. ('a','b','c','d','e')@(0,1,4) would be ('a','b','c','d','e') at indices 0,1 and 4.

This would mean its current use, to mark single value lists, would be disabled. I am already introducing a better way to write lists in the next version so no functionality will be lost but if anyone has used the @ operator already then their stories will break if they upgrade to the next version.

The alternative is to keep the @ operator as it is and use a different symbol. I'm considering the colon ':'

If you have an opinion please share it, either in the comments or the subreddit

Friday 18 April 2014

Subreddit

I've created a subreddit for StoryTeller.

If you would like to discuss anything about the project or share your own stories please head over there

Version 0.2 Released


A new version of StoryTeller has been released. This version adds support for lists, iteration, sets and relations.

Lists

A list is an ordered collection of values. You can define a list by separating the values with commas. For example: (1,2,3,4,5).

Loops

The foreach statement can be used to repeat part of a page once for each value in a list.

Sets

A set is a group of things. For example the set of characters in your story.

In StoryTeller, sets also serve as lookup tables. Each member of a set can have values associated with it in key-value pairs.

Relations

A relation describes some fact for all of the members of one or more sets. One example is a relation between the sets of characters and objects in a story which describes whether or not a character is holding a particular item.

download the new version