Now that I’ve decided to turn Storytron into a tool for story generation, what are the next steps? What’s the next best thing to do?
There are a lot of ideas floating around in my head. Here are a few that I wrote down the other day.
- Code documentation
- Code cleanup/refactoring
- Goals, plans, and scripts – what are they, relevance, how to implement?
- Temporarily removing the “interactivity” from Storytron storytelling
- Total actor agency – what is the best way to accomplish it
- Older story generator code and current procedural generation frameworks
Obviously items #1 and #2 apply to the current SWAT 1.x code, the only code currently out there that runs (let’s forget about the encounter and face editors for right now). Learning how this code works, how it’s put together, and cleaning up some of the messier sections (okay, all of it) has always been at to do item on my list. I’ve also toyed with the idea of refactoring JavaFX into the existing Swing/Java code base to spiff up the user interface and make it easier to create new editors and things like that.
I’ve read some Oracle documentation about how to integrate JavaFX into an existing Java application (link) but it doesn’t seem particularly easy or maintainable. So I thought why attempt to put lipstick on a pig? Why not start from scratch, from a Hello World JavaFX application, and go from there?
Of course if you’ve got code that works, no matter how badly architected or buggy, throwing it all away and starting from scratch is anathema (link). I am not talking about doing that, which is what Crawford is doing with his Delta-tron project (link).
The current SWAT code is Java and the code in a JavaFX application is Java. So what I’m going to do is get a JavaFX Hello World application up and running and then cut and paste the Java code that I need from SWAT 1.3 into SWAT-FX. I can migrate just the code I need one step at a time, understands and refactor it along the way, as well as doing what modifications I need make to get it running in the SWAT-FX application.
So what basic functions should the SWAT-FX application be able to do?
- Read in a storyworld XML
- Create a Deikto structure from the XML
- Display the verbs, actors, props, and stages that it created (as “number of” or “list of”)
- Run the storyworld to termination without user intervention
- Display the Storybook and Log
There are two assumptions that I’m making based on the list above.
- Any storyworlds that used by SWAT-FX will have to be created with SWAT 1.3
- All actors will have total agency; the story will start and end without user intervention
Which brings me to items #4 and #5 from my original list (removing interactivity and total actor agency). I believe it is possible to create storyworlds in SWAT 1.3 which start, run, and end without any user interaction. I believe I started doing it with Siboot for Storytron back in 2010 but I never got the whole thing completely working. I believe it can be done with Fate verbs and alarms. I believe that with Fate verbs, consequences, alarms, and some scripting it can be jury rigged.
Which leaves items #3 and #6 in my original list (goals/plans/scripts and old code/new frameworks). The goals/plans/scripts part comes from the title of Roger Schank’s book “Goals, Plans, Scripts, and Understanding” (link). I recently acquired a copy, which I had read many, many years ago back in the late 1980’s when I was trying to figure out how to write my own text adventures. Though I didn’t apply Schank’s concepts back then his ideas have always stuck with me (Schank was James Meehan’s graduate advisor on Tale-Spin).
Shank’s ideas, older story generation code like Tale-Spin, Minstral, and Universe, newer procedural generation frameworks like Tracery (link), Improv (link, link), and Curveship (link) make me ask myself some meta-questions. What is story? What is narrative? What is point-of-view? I’ve struggled with the same questions in my own writing. How do some of the current tools out there like Inform 7, Twine, and Ink been used programmatically to answer these questions and what implementation details can we learn (and steal) from them?
So there you have it, three areas to investigate.
- Old SWAT 1.3 Java code combined with new SWAT-FX user interface
- Figuring out how to create non-interactive stories with SWAT 1.3
- What can old code/new frameworks teach us about story and narrative
Exploring each of these ideas will probably lead to other ideas and experiments.