Skein appreciation thread

I’m deep in the middle of testing my first real Inform game, and I have discovered:

  • the Skein is extraordinarily useful for testing;
  • the Skein is not super well documented.

I thus wanted to start a thread to:

  • share the documentation I have found on the Skein, and evangelize a bit;
  • request more information on how y’all use the Skein in practice.

Documentation

The official docs have a brief section on the Skein, which includes:

The Replay button demonstrates that Inform must be quietly remembering the commands typed into the last run through the story. In fact it remembers, and automatically organises, every previous run. […] If we think of the list of typed commands as a thread, then the skein is (as the name suggests) braided together from all these threads. In the display, time begins at the top, with the start knot, and the threads of different play-throughs hang downwards from it.

Double-clicking on a command translates the source afresh and replays the story from start down to that command, and then stops. We are then free to continue play by typing commands into the Story panel, of course, and these commands will automatically be recorded in the Skein as a new variation of play, diverging from the previous threads.

The user interface for the Skein looks slightly different on different versions of the Inform apps (that is, the MacOS version is not quite the same as the Windows version, and so on), so this manual is not the best place to describe it. In any case, the best way to find out about it is probably to experiment.

The user interface for the Skein looks slightly different on different versions of the Inform apps (that is, the MacOS version is not quite the same as the Windows version, and so on), so this manual is not the best place to describe it. In any case, the best way to find out about it is probably to experiment.

@Jim_Aikin’s guide has rather more, including some details on what blessing and locking mean. (Concepts not mentioned in the official docs!)

At any time you can switch to the Skein and double-click on a node (the Documentation calls them
“knots”), and the game will first be compiled and then replayed from the start up to that knot. The
Skein is like the Replay button in the top toolbar, except that it can replay any playing session, not just
the most recent one.

As you work on your game, the Skein can get pretty crowded with branches (Inform calls them
“threads”) that are no longer needed. You can trim these out by right-clicking (Mac: Ctrl-clicking) and
choosing “Delete all below”. […] If you want to delete everything in the Skein, you can use
the Trim button. This will get rid of everything except the currently active thread and any threads that
you have locked.

As your game gets closer to being finished, the Skein will become quite useful. You can play the entire game manually from start to finish — until you get to the *** You have won *** message (or whatever message you’re using to indicate victory) — and then open the Skein and lock the thread you’ve just created. Locking a thread will stop Inform from deleting it, even if you use the Trim button.

In the Transcript panel, you can bless the output transcript for this thread. Blessing tells Inform that this is the output you hope to see in the final, released version of the game. Blessing has no actual effect on the game itself; it’s just a record-keeping function. It stores a transcript so that you can look at it later.

Evangelism

Previously, I’d found the Skein mostly useless. Every time I opened the panel, I was faced with an extremely “bushy” skein: tens of threads diverging almost immediately, many quite short. The only time I opened this panel was when Inform became slow for me, because trimming everything seemed to improve performance.

Yesterday’s revelation was that the Skein is much more useful if you use it consistently. I tried heavily using the Skein’s replay feature, locking down and labelling any nontrivial thread I created, and blessing frequently. This created a very different Skein: much deeper, with branching that corresponds to meaningful gameplay differences and not the order in which I happened to type commands. I’m not sure I’m getting much value from blessing transcripts so far, but tentatively it seems good at catching small whitespace changes I’ve introduced.

Questions for the group

Do you use the Skein? Any features that the docs I’ve quoted above are missing? Any patterns of use that you’ve found particularly effective? Any other docs online that you’ve found helpful?

6 Likes

This is the basic problem with the Skein. You can’t try using it a little bit to see if you like it. Just about everybody who looks at it has the same initial experience as you.

(Compare the TEST ME command, which can be added incrementally to a project.)

If you tell a new Inform user to commit to the Skein right at the beginning of their project, they will correctly tell you to go piss up a rope. They’re dealing with one big job (learning Inform) and you just gave them a second one (learn to manage the Skein). Nobody needs that.

5 Likes

This is an honest relief to hear you say that. I’ve wanted to like the Skein for awhile, but I cannot grock it yet.

It’s only with my latest project that I’ve started really using it, after coding in Inform for however many years, and I have to hit “trim” every hour or so. Basically I’m using it to store a bunch of different test scripts that are too long and unwieldy for TEST ME.

3 Likes

I’m not saying that the skein is hard to learn! (And if you want to learn it, start with the first post in this thread.) Just that Inform has a general principle of “minimize the number of features a beginning author needs to remember when writing their first few rooms.” The skein breaks this principle the first time you look at it. Or if you work on a project long enough to run into IDE lag from skein bloat.

(This is a subtle principle. Remember how the I6 library has a SWIM verb whose default response is “There’s not enough water to swim in”? That’s a problem! If you added a pool, stream, or river to your game, you had to remember that verb existed so you could customize the SWIM response for that room. It shouldn’t be the author’s job to know the whole library from day 1 in order to avoid those traps. SWIM was removed from I7 for exactly this reason. The DRINK default response of “There’s nothing suitable to drink here” is another example, still present in I7.)

Anyway. I wonder if the skein would be more approachable if it only saved the current thread and locked threads. (Or, equivalently, if it auto-trimmed every time you started a new game.) That way, when you looked at the skein for the first time, it would show you only the most recent run-through. Not immediately useful, but also not scary, and it would lead to an obvious next step: play the working part of your game and then bless it. That would be an incremental learning experience.

I’ve never felt like the “skein saves everything” behavior provides any meaningful value, anyhow.

7 Likes

As a separate problem, the skein seems broken on MacOS anyway? There’s no Trim or Lock commands at all, and Bless doesn’t seem to do anything.

2 Likes

Well, Ben, you’ve inspired me to give the skein another shot. I’m working on a large game and could really use the functions it purports to provide. And, oh god, I’ve been working on this game for years and the skein is massive. Hopefully cutting out all of it and starting over will fix a sluggish IDE.

Update: woof. could really use a “delete all” option.

2 Likes

So much for skein appreciation. :sweat_smile:

Yep, completely my experience. Part of it also was that I never really figured out the point of the skein or how to use it for testing, so when I started having the problems that it’s supposed to help with I’d already trained myself to ignore the tab.

I like this idea! Or perhaps some tiny number of unlocked threads (3?) so that the branching is obvious, and to avoid accidentally losing some important state.

Yikes! The Linux version is a little janky but all those features still exist.

In theory this is “trim”, with the dial cranked all the way up. But @zarf mentions above that this seems broken at least on OSX. Which OS/IDE version are you using?

1 Like

Windows Inform 7 6M62. I was ultimately able to trim it, but because the skein had gotten so massive I couldn’t find the starting node for a long time. The scroll bar was too wide and I kept skipping past it without being able to see where it was. After about 20 minutes of deleting threads, I finally worked my way to the main node and was able to trim away the whole thing.

2 Likes

I love the idea of the skein only keeping the most recent thread unless saved. The entire problem I find with it is that it gets so big and so unwieldy so quickly. Especially when I’m implementing a new command and am trying various commands/ phrases etc.

It’s most useful when I’m trying to get back to a particular state to test whatever bug I’m trying to fix. But it takes ages to find the thread I want, and cleaning it up is a little frustrating because after 5 more minutes of testing it’s returned to being a forest of random threads. Making it so that you have to make a conscious decision to say “this is an order of commands that I care about repeating” would be a lot more intuitive.

4 Likes