Version 0.9.0
First post-Heaven's Vault release! And as such, this mainly brings in features that we developed while working on Heaven's Vault.
- Shuffle-once and shuffle-stopping: New variants for shuffle sequences that allow you to change what happens at the end of a shuffled sequence. Adding 'once' does nothing when the sequence is finished (can be written ink
{shuffle once: ...}
or abbreviated{~!: ...}
. Meanwhile, adding 'stopping' repeats the final branch of a sequence when the shuffle is done:{shuffle stopping: ...}
or abbreviated:{~$: ...}
. - Background saving of state: If you have a lot of state to save, it's now possible to save on a separate thread (preventing frame drops), and while continuing to evaluate the story on the main thread. It can do this safely by making the main state read-only while saving, and writing any state changes to a temporary "diff patch", which is applied when the save thread is complete. Call
var stateToSave = story.CopyStateForBackgroundThreadSave()
and then when you're done callstory.BackgroundSaveComplete()
. - More efficient/faster main runtime (when calling Continue). When the engine looks ahead for whitespace it previously had to do a lot of copying/restoring the entire state. Now there's a patching system so that only small "diff patches" get created during evaluation - much faster!
- Saving story state faster and memory efficient (generating less garbage). Faster when variable values are still set to their initial defaults - it only saves out those that have changed.
Unity integration package available here