The Skein and Dialog

Continuing the discussion from Dialog vs. Inform 7:

There isn’t anything Inform-specific about the way the skein is implemented. Theoretically someone could borrow the code from the skein and put it in Dialog if implementation language and licensing permit.

A Skein would be interesting, though I wonder how to best represent one.

If I recall, right now it is possible to feed a text script in to a game being run by dgdebug and redirect the output to a file, which can then be tested with diff against expected output, much like blessing. What is missing is some method for adding branch points and jumping back to them in a single input script. (A graph visualizer like Inform 7 has would be nice, of course.)

I think the @save and @restore utilities of dgdebug might be used. Consider the case of going north, then either going east or west. A skein might be:

go north
@save
branch1.log
go east
look
@restore
branch1.log
go west
look

This gives us almost what we want:

An Interactive Fiction
An interactive fiction by Anonymous.
Release 1. Serial number DEBUG.
Dialog Interactive Debugger (dgdebug) version 0m/03. Library version 0.46.

Home
You are here.

> go north
You walk north.

Branch
You are here.

> @save
branch1.log
Note: Successfully wrote input history to "branch1.log".
> go east
You walk east.

Desert
You are here.

> look
Desert
You are here.

> @restore
branch1.log
Note: Successfully read input from "branch1.log"



An Interactive Fiction
An interactive fiction by Anonymous.
Release 1. Serial number DEBUG.
Dialog Interactive Debugger (dgdebug) version 0m/03. Library version 0.46.

Home
You are here.

> go north
You walk north.

Branch
You are here.

> go west
You walk west.

Forest
You are here.

> look
Forest
You are here.

> 

Ideally however a skein shouldn’t reprint what’s already been printed, we don’t want the whole story told over and over again just the parts that differ. Maybe dgdebug can be modified so it is possible to @restore quietly? Another thing that may be an issue with large stories with lots of deep branches is that on restore the whole story is processed from the beginning; saving and loading binary dumps may be more efficient, at the cost of portability between systems.

Blessing would simply be saving a log to diff against for regression tests, I think.

I may be missing the point about skeins however, as I never really used them in Inform 7, so maybe there is a use case this doesn’t address.

1 Like

Maybe this is obtuse of me, but could you not simply chunk each path’s transcript by input prompt and then adopt some kind of diffing logic to merge them?

1 Like