Raconteur, a new way of writing for the Undum engine

As some of you have probably already heard, today I’m announcing Raconteur, a more polished descendant of the library I used to develop Mere Anarchy.

You can read the full announcement on the website, and I’ve also posted the first part of a tutorial about how to use it.

Feel free to direct inquiries straight to this thread, or to me through a forum PM or Twitter.

Oh bleeping finally a way to work in Undum which isn’t just “Here’s a bunch of Javascript now hack it.”

Hey cool! I also appreciate the effort you’re putting into presenting it with tutorials and instructions.

I would LOVE to work with Undum without asploding my head.

It still looks rather difficult, but your efforts are appreciated! Especially if you can get it down to a simpler language or an IDE with minimal coding.

IDE is at best a distant possibility. “Simpler language” isn’t really desirable; I don’t want to strip down Undum of its power. The goal is to build an embedded DSL (Similar to what Rails, RSpec, Sinatra, Express, Jasmine, and many other tools define) which makes the simple things simple and the hard things doable.

I’m really liking the tutorials. Thanks again for putting this all together; it’s very functional and beautiful.

And I wanted an IDE since I do not know the first thing about Java, but these clearly-written tutorials might make it possible. Undum needed documentation like this, so thanks for all the work.

It’s JavaScript, not Java. :slight_smile: Confusing the two is a terrible idea - they’re completely unrelated except for slightly similar-looking syntax; it got saddled with the name JavaScript and curly-brace syntax for some pretty ridiculous reasons back in the nineties. So not knowing the first thing about Java is if anything a help in learning JavaScript.

Of course, in those tutorials I’m using CoffeeScript, a language that transpiles to JavaScript and is even less java-like (Because it does away with the curly braces).

:smiley: Now you know the extent of my ignorance!

Well it’s never too late to learn. CoffeeScript, for what it’s worth, pretty much just has the semantics of JavaScript; the CoffeeScript page has pretty much everything you need to know.

As for learning JavaScript, I recommend Eloquent JavaScript.

Nice! Just the other day I was wondering whether anybody wad doing something to boost the popularity of Undum, and… I hope this is it.

Oh, and I think I’ve already gone on about how much i love coffeescript. I would prefer Stylus over Less, but either way - really nice!

You don’t have to use Less - check out the Gulpfile in the scaffold. It shouldn’t be too hard to edit it to use Stylus instead, and then it’s just a matter of converting from one format to the other. A bit of effort, but if you really prefer Stylus, you can do it. There’s a Gulp package for it.

(If you don’t know Gulp - it’s really quite straightforward, which is why I chose it for this, and learning it is definitely worthwhile if you do any JS dev.)

I actually prefer Sass over Less, but I chose Less for the scaffold because 1. It’s more popular than Stylus, 2. The syntax is CSS-compatible so people who don’t know a CSS preprocessor might have an easier time, and 3. It has no dependencies outside of the JavaScript ecosystem, unlike Sass.

Thank you for doing this - this work looks very helpful and I just started looking at Undum again so this is perfect timing!

One thing I wonder if could be addressed - playing an Undum game overall is a lovely experience UI-wise with one exception: when you’re on a mobile screen, the stats/attributes window is hidden away unless you summon it and then takes up the entire screen, and when you exit the stats window screen, you are returned to the top of the narration page instead of wherever you where in the narration when you decided to look at your stats. It’s jarring and can involve a fair amount of scrolling to get back to where you where in the story - pretty disruptive compared the rest of the smooth Undum experience. Is that something that could be addressed in your work - making it so when you exit the stats window you’re returned to the scroll position you were at when you summoned the window (similar to how choicescript games do this on mobile when you exit their stats screen)? Or does that reach too far into core Undum? (Or does this particular problem only manifest in the sample story on the Undum site, and is already solvable? That would be great!)

It’s unfortunately an issue with how Undum itself works - it has three div elements (The left pane, the right pane, and the main game content) and it switches between hiding two and showing the other with javascript.

The fix I’d like to attempt (but haven’t had time to) is to just strip all of the mobile-specific code out of Undum, and let CSS with media queries handle it all. Another possible fix is to make it so the content div is never hidden, it just goes underneath the other two divs when those appear. However, all of those fixes mean that authors would have to make sure their character and info panes fit within a mobile screen without scrolling, since they would need to be fixed; the current set up has the advantage that they can be as long as you want because they can be scrolled themselves. Another possibility would be using javascript to save the scrolling point on each screen when it’s switched to/from.

Currently Raconteur already relies on a fork of Undum (Because Undum isn’t a commonjs module, so I maintain a slight fork that just wraps it as one), though I might in the future change that importing setup and go back to either 1. packaging mainline Undum with browserify-shim (unlikely), 2. Using browserify to bundle only game files, leaving the vendor libraries (jQuery and Undum) on the global namespace because they both have well-behaved exports anyway (more likely) or 3. a much more thorough fork of Undum set up to function in a different way. So finding a solution for that problem is actually kind of tangled with the future of Undum. But I’ll have a look and see if that can be changed on the present commonjs branch I’m maintaining for Raconteur; if I forget about it could you open an issue on the Github page for my fork? And then we’ll see about getting it backported to Undum’s own main branch.

That’s great that that fix can make it on to your roadmap - thanks. From the options you mentioned, I would vote for the javascript-saving-the-scrolling-point fix, so that authors would not have to worry about the length of the info panes (it would be really hard to come up with a guaranteed safe length anyway, given so many different mobile resolutions). I’ll add it as an issue to your github in a bit if you don’t get a chance to do it first.

Clod’s Quest had some changes for mobile browsers. (Since the game relies on switching back and forth between the status window and text, it was unplayable on a mobile browser without those changes.)

Could you highlight the relevant bit of the sources for me?

It’s been a number of years since I wrote it, so I can’t remember where they are.

textadventures.co.uk/games/view/ … of-zivulda

Raconteur has been updated to version 0.4.0, with one major change. I expect updates for the foreseeable future will not break compatibility, so the scaffold as it exists now should be safe to use and keep updating raconteur as you go along. If you find yourself using Raconteur, I would love to hear about it.

I just submitted the mobile scrolling issue, but it’s not showing up - maybe it needs to be approved after it’s submitted, to appear? Or maybe github just ate it. Let me know if I should re-submit.