Using Tinderbox for "stepping" through an interactive narrative / hypertext (in this case in Choicescript)

Hey folks!

Been loving my new dive back into Tinderbox after a few years. So much new stuff!

I have a challenge that I don’t really know how to approach related to agents and actions.

What I’m looking to do is to use Tinderbox to help me write an interactive narrative (Choicescript ‘Interactive Fiction’), that actually relates to how I want to use Tinderbox to help me when I write fiction in general. (I started a thread here about using Tinderbox to CODE choicescript, which was really helpful: “Using Tinderbox to write a Choicescript interactive narrative” --> but I realized that using tinderbox to plan and tune the project seems like a much better use of if, as I can “bake” text to choicescript code as I go if I work out the right references and drafting in tinderbox, leaning on native tinderbox techniques instead of fussing over output.)

What I’m looking for is some means of using Tinderbox to “step through” a sequence – with decisions along the way – where I can use agents to collect and process a few variable states so that I can evaluate, when I reach note “X” in a sequence, what the reader/player knows/understands about their experience so far.

Navigating through the steps would involve moving from note-to-note along a choice path (following decisions at each node), and each decision might instead of leading to new “pages” of text, instead have other stats consequences that might have effects upon nearby or far future notes as you continue. For example, inserting a paragraph that might not appear, flip a set of nouns from one value to another, etc…

For choices-style interactive fiction – at least the Choicescript variety – part of the expressiveness comes from having a number of stats changing along a sequence of decisions separately, where each new text you read might have a number of substitutions/transformations based on these stats states, and might change the choices available at that node, based on a playthrough. SO unlike Choose Your Own Adventure gamebooks where you are basically flipping from fixed text to fixed text, each “pagefull” might be tremendously transformed even when you are working through relatively similar choice paths.

Basically, you have a number of systems running with a slight amount of independence, so that the “cocktail” of how they effect each new experience in the story can vary tremendously.

Look, this community includes some insanely impressive hypertext folks, so it may sound like I’m trying to introduce a pretty constrained approach to hypertext as a “new thing,” but my point is this: that choicescript is pretty straightforward as a system, but really hard to troubleshoot because there are so many ranges consequences to decisions that you can’t actually trace a simple branching diagram. So you evaluate it by running trace programs that “play” the system thousands of times to work out a distribution of what percentage of computer driven readers would get to what bit of text. Which is really cool, but I feel like I would benefit from better understanding the system during composition itself.

It seems like Tinderbox would be a great tool for something like this. But I have only ever used it as a single system where when I add a new note, the agents and actions can respond to that note or where I move it, and execute changes. Because despite having had version of TBX since 2005, I never really learned to use Tinderbox as an engine where I can evaluate the consequence of changing one variable at one stage of a path, and get a readout of the effects of that step. My “steps” were me as an operator doing something, with no sense that i would ever want to consider a huge constellation of potential operations and their consequences on the system.

If there are any example projects or case studies out there that I might learn from, that would really help me!

Others will address the technical details – you came to the right place for that. I wonder if you’ve looked into Tinderbox’s sibling, Storyspace, as a possible vehicle since it excels in interactive fiction.

Storyspace: Storyspace.

1 Like

Well, I was actually looking to Storyspace. It seems like storyspace might be a great tool to EXECUTE a project like this, but I’m wondering if using tinderbox for lots of fussing and tweaking variables and testing states would be a better match. I really liked the idea of creating prototypes for nodes with a HUGE range of data including text substitutions, and then testing exports of each of those interactive fiction nodes to learn the impact of various stats settings.

I … have never used storyspace but I have been interested thanks to reading projects created with it. And I do find Mark’s book about storyspace and hypertext pretty inspiring. (The chapters that I read – i should review with a notion of maybe using storyspace.) It seemed to me that if I used Storyspace, I might as well just create a great storyspace project. But I’d be in the same boat as far as debugging and tuning a system like this. (Apologies if there are much better debugging and authoring tools in storyspace that I don’t know about.)

Looks like the Storyspace angle has been covered, so let’s look back at the testing angle. The main affordances prototype(e) will give you are * pre-setting some attribute values, whether for visual distinctiveness (e.g. $Color, $Badge) or for consistent set-up of text pane display of attributes ($DisplayedAttributes).

Using prototype(s) also helps with addressability with queries. By starting a query with $Prototype=="[prototype's title]" you can quickly focus the query on a subset of the document’s notes.

You shouldn’t need lot’s of queries, probably one per major distinct type of node - i.e. where they have very different properties such as locations v.s. a person, etc.

Agents are good for initial sketching/testing if your doc’s general process but if you’ve many nodes you probably want to graduate from lots of agents to edicts running find() query scoped actions to avoid unnecessary agent activity slowing up your document.

You might also consider suggested values for user attributes as a way to aide data input by allowing selection from a list rather than typing in each value by hand.

I think part of the challenge here is figuring out the structure in advance of the whole - given that we live in an age of expecting things to ‘just work’.

I think what’s proposed is very possible, though “some assembly” will be required as will the discipline of delayed gratification. IOW, there is no pre-built model, but an erector set offering all the likely needed components.

1 Like

You might also want to contact Stacey Mason stcmason@ucsc.edu at Santa Cruz, who knows all the languages involved.

I think you want to write in Tinderbox, possibly then review sequences by reading them in Storyspace, and ultimately port to ChoiceScript.

There’s a fair amount in Gettin Started With Hypertext Narrative on what Emily Short calls “value-based IF”, selectively enabling or disabling links and nodes based on selected attribute values. Like, you can only go on the roller-coaster if you have at least two ride tickets.

1 Like

Thanks, Mark and Mark, these are both really helpful responses.

Mark A, you might be right that I might really want to be solving some of the values and gating as “precomputes” even just in a spreadsheet to have an functioning system where the notes are great places to draft and add more information, instead of battling these elements within tinderbox itself. I think that is essentially how everyone does this with Choicescript anyway.

And Mark Bernstein, I think you are completely right with your mapping of tools to roles there.
I will ping Stacey for thoughts. And go back and re-read your Getting Started with Hypertext Narrative which I now have open here. Embarrassed that I haven’t finished it – but definitely left the first few chapters really excited about the topic last time. :slight_smile: