Tiny QBN for Twine/Sugarcube

#1

For the last year or so I’ve been working on a mostly-text game in LOVE2D with a couple of friends (a silly space adventure inspired by Oregon Trail and Seedship) with a couple friends. We’ve been using a filtered-card-deck system where events require certain true/false flags to be selectable (are we in a particular type of solar system? Are our food resources getting low? etc.). It’s extremely simple but surprisingly capable.

Since I saw the announcement about StoryNexus closing their doors to new worlds I’ve been mulling over the idea of creating some sort of tool to help fill that seemingly-under-served niche…and today I sat down and banged out some JavaScript for Twine/Sugarcube to implement a system like the one we’ve been using.

So you tag passages with requirements (“req-lowFuel”, “req-not-lowMoney”), insert matching passages (all or a random selection) wherever you want, and continue to use links as usual in Twine where that’s appropriate. There’s a helper function to generate the appropriate range flags (low/medium/high or whatever) from variables

Does that sound like something that there’s any chance people would be interested in? I’ll probably keep playing with it either way but I’ll put more effort into docs and a tutorial story if other people want to play along.

–Josh

2 Likes

(Hanon Ondricek) #2

Yes, please! I’m interested in seeing this.

0 Likes

#3

I am also interested in seeing and experimenting with your work as it progresses.

Thank you.

0 Likes

#4

Wow, two positive responses! I was expecting deafening silence. :slight_smile:

Here’s what I have so far: github.com/JoshuaGrams/tiny-qbn

I think it’s feature-complete relative to what we’re using in our Love2d game.

I wrote 700-ish words of reference documentation which I think describes everything, but it’s fairly dry. I’m working on hammering out a small demo that shows it in action. And it definitely needs a “cookbook” showing some of the more involved techniques.

Also, it all basically seems to work OK, but I’m still working through my list of corner-cases and writing tests for them, so who knows?

0 Likes

#5

I ain’t dead, I’se just procrastinatin’…

I spent three days waffling around because I don’t know how to write fiction so I kept getting bogged down on what to write, and because I find Twine so irritating to use. And then I got hopelessly sidetracked by implementing about half the puzzles from Mike Spivey’s Junior Arithmancer, but I guess that was a good test of doing more complex things with it.

But I’m getting back on track.

  • I found and fixed a bunch of bugs.
  • I moved the styling out of the Javascript and into Sugarcube widgets, which is more wordy to use but also more flexible.
  • I made things interact properly with Sugarcube’s history.
  • I think I figured out a demo story snippet that I can actually write: hopefully I can finish that this weekend.

I’m still experimenting with ways to do StoryNexus-style “show the requirements for this story” thing, and to deal with stories that should be visible even though not all their requirements are met (so you know what you’re working toward). Those things are possible already, but you have to do it yourself and it seems a bit clunky and brittle. I’m having trouble deciding whether to just document the techniques and idioms or whether I can figure out some helper macros that make it easier without restricting the possibilities too much. As with the styling, I’d like to push as much as possible into Twine code so it’s more flexible, but some things are better (or only possible) in Javascript.

0 Likes

(Hanon Ondricek) #6

I don’t know if this helps you or not, but AXMA Story Maker’s latest version is all in JavaScript. I’m stumped on it, but I’ve always preferred ASM to Twine. Still waiting for the full English documentation - right now I’m reading the Russian doc online and auto Google-translating it which is sometimes not very helpful…

Make sure translation is on to read the site (unless you know Russian) - There is an English part of the board.

axma.info/

0 Likes

#7

Huh. I had looked at AXMA a while back, but when I tried using the Google translate web-page on the manual under Firefox, it didn’t work: it just translated the base page and not the actual Javascript-presented manual pages. I’ll have to try Chrome’s built-in Google-translate…

Yeah, that works. Thanks.

Edit: I read the manual and played around with the tool for a while. It is nicer than Twine in a bunch of ways, but I have a thing about not directly donating my time and energy to support proprietary products…

0 Likes

#8

OK, I think that I’ve worked out all the major kinks and am done “improving” the API. I’m really happy with this, especially for something I built in about 10 days of my spare time.

I made a three-part tutorial walking through the creation of a simple example. I should really add some more content to the last stage of the example, but I think it’s enough to get started with. I made videos of the tutorials and posted them to Youtube. They’re probably terrible, but if you prefer video to text, they exist. Though if you prefer video to text, what are you doing here? :wink:

github.com/JoshuaGrams/tiny-qbn … d-examples

If anybody takes a look at this, I’m open to suggestions of where to go next with the documentation. Or feature requests: I’ve built three half-baked test pieces (plus my experience with the Love2D game) but it’s always possible (even likely?) that there are things I haven’t anticipated. Twine puts some significant limitations on things, but if you have needs that this doesn’t meet, I’ll see if I can reasonably do anything about it.

–Josh

0 Likes