The Skeleton Light

“It’s not a loop – it’s a spiral!”

 

That’s Alan Wake, in Alan Wake 2. If you try to attribute the quote in the normal way, you get this:

“It’s not a loop – it’s a spiral!” – Alan Wake, Alan Wake 2

which looks ineluctably like a typo. Anyway, spirals. Tomorrow is the seventh anniversary of the release of Cultist SimulatorA couple of thoughts about how we got here from there, and how we got there from somewhere else.

When I started making Cultist, I’d never coded anything in Unity at all. hadn’t done any actual coding since I built the Fallen London CMS (once nicknamed ‘Jonathan’ and later rechristened StoryNexus). Once that was up and running, I focused on writing interactive narrative inside that CMS. Which did have loops, ifs, variables, a lot like a programming language – but a very soft-cornered, simple, limited one.

Simple illustration of very early version of quality<->storylet loop
three-parter from *2010* behind this link if you want more about early qualities and storylets thinking

It occurs to me that it might seem odd for a programmer to go from using a versatile and powerful programming language to using a soft-cornered, simple one. One reason is that I wanted, from the start, to build a system that let a team work on expanding a big organic narrative – hence ‘storylets’ – and I knew that most people who wrote for Fallen London wouldn’t be programmers. But there are two other reasons I want to talk about.

Skeleton Watch - By jcw - Own work, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=12564441

The first is that I like the player to be able to build a mental model of what’s going on inside the game. Game mechanics can be poetic, in the way a skeleton watch is poetic. If the framework is simple, or even elegant, you can make that poetry visible by making it visible through an interface that works like clear glass – or at least a translucency through which you can see the glow of differently coloured lights.

The second is that the constant shift back and forth, between the writer-designer’s stance and the coder’s stance, makes one’s brain ache. Ambiguity, surprises, the unconventional – they’re not things you seek out when you’re coding. Meanwhile all the deadly enemies of reasonable, readable, maintainable code are the friends and familiars of vivid writing. Interactive narrative lives in the lightning-riven hinterland between those two stances. If you just surprise your players, you get frustrating dream-nonsense. I went to Chris Avellone (still, for my money, the single most accomplished writer-designer walking the earth) for advice on Travelling, and one of the things he told me was “Treat your dialogue options like an interface selection screen.” When you’re trying to build consistent, stable, and bug-free mechanics on the one hand, and trying to make ‘every word do as much as possible’ on the other… you can’t do both things at once. It’s like getting out of a bus and on to a bicycle, but behind your eyes. Hence the brain ache.

So you minimise the ache by sketching out the mechanics first. You put placeholder text like GIRL SAY NO EAT PIG that you replace in a writing pass later. 99.99% of the time you replace it, anyway. Using a stable searchable phrase to mean ‘UNFINISHED!!’ is a showsaver. I favour ‘fnord‘, a habit I picked up in my salad days from a gentleman named Towlson.

But still the brain, she ache. Coffee help, but coffee no cure. In a microstudio you can’t throw the final product over the wall and forget about it. You have to keep going back and forth between text and mechanics, talking to localisers, fixing bugs. And the real problem isn’t the brain ache, it’s the mistakes. If you’re driving a bus and still thinking like a cyclist, it’s easy to miss things.


 

That’s why I described the CMS as ‘soft-cornered’ above. It limits the harm you can do and it allows you to make small, intuitively accessible changes, without changing the fundamental framework. When I started making Cultist, my first goal was to set up a framework that I could change when I was thinking like a writer-designer, without having to shapeshift into a coder and back again every time. (Expecially since, as I said above, I’d never coded in Unity! I needed considerable help with the UI part of Cultist, and I didn’t want to have to go back into the non-framework code and change things that at the time I only half-understood).

In Fallen London, storylets are unlocked when your character has (or lacks) qualities at a particular level. Choices in storylets can then increase (or reduce) some qualities. Which in turn unlock new storylets. Round and round we go, a spiral not a loop.

In Cultist Simulator and later Book of Hours – recipes are storylets, aspects are qualities. There are two big differences: aspects are local, and choices are implicit. ‘Aspects are local’ – a Fallen London storylet can always see whether you’ve got Shadowy 50, but a CS/BH recipe will only know you have Forge 10 if you can fit it, via element cards, into the slots. ‘Choices are implicit’ – you never get a numbered list of choices  on a Cultist verb window. It’ll show you the result you get from one particular combination of aspects, and you can (only) change the choices by changing the combination.

 

 

And these two differences are closely intertwined. Local aspects allow the player to experiment, implicit choices mean the results aren’t visible before you find a solution. There are exceptions and refinements to everything I just said! but that’s the principle of the thing. Neither approach is better than the other – they’re different designs for different games (although I wish I’d hit on the elements-have-aspects relationship in Cultist back in the Fallen London days – it would have saved a lot of duplication).

On to Travelling at Night.

Our very early sketches had it using something like the aspects-and-recipes system (for reasons lost to time this is known as the ‘Castle of Ghost Kittens’ phase). But when we decided it was going to be, formally speaking, a CRPG, aspects-and-recipes fell away. The CRPG form expects dialogue trees. Dialogue trees mean explicit choices. Explicit choices meant we would need to take something more like the FL than the CS/BH approach.

I’ll be honest, I wasn’t thrilled about writing yet a third framework before I could get started on the content. Fortunately, as we’ve mentioned elsewhere, we could use a very well-regarded piece of middleware: PixelCrushers’ Dialogue System.

The heart of PDS is this kind of thing, which will look comfortingly familiar to anyone who’s ever used this kind of toolset before:

But where are the qualities and/or aspects in this?

Well out of the box, PDS gives you Lua scripting, an absolutely standard, versatile, powerful way to check and set variables, or add your own custom functions, like this:

Coder or not, you can probably get a general sense of what that code checks and does. But coder or not, you would probably struggle to remember the syntax and the variable names when typing it in a text box. And coder or not, you would have to be fairly sharp-eyed to notice that there are three typos in the ‘Script’ box, one of which would crash the game. Lua scripting is not soft-cornered. It’s not the kind of thing you can slip casually back into halfway through a writing session, without risking mistakes.

This is not a flaw in PDS or in Lua. Power and versatility are edged and bladed weapons, and Lua is such an anything-goes environment that it’s not straightforward to validate it. Fortunately, one of PDS’ many virtues is that it’s really customisable. I spent the last couple of weeks getting friendly with Unity’s GUI system, bolting my own tooling on to the side, and can now do this inside PDS:

and this:

…which makes writing sessions considerably less of a white-knuckle experience.

It was nice going back to ‘Qualities’. Aspects in Cultist Simulator were nearly called ‘Qualities’. It’s a usefully versatile word. I went with ‘Aspects’ partly because of the occult context, but partly out of an irrational desire for reinvention which I’ve now grown out of. I’ll talk another time about how Qualities in Travelling are different beasts than the ones in Fallen London – more vertebrate, you might say. A spiral, not a loop, like the man said when OOPS NEARLY A GIANT ALAN WAKE 2 SPOILER.

I have just now noticed that I made it ‘cashRepublic’ not ‘cashState’, which is serendipitous because I didn’t have a good end for this blog post. As it is, I can now show you this snippet:

and this godawful vexillological delinquency. Pétain adopted it as his personal insignia in the Vichy years, and in our divergent history, where the wars are won but France remained divided, it flies yet over Antibes.

3 comments on The Skeleton Light
  1. > Using a stable searchable phrase to mean ‘UNFINISHED!!’ is a showsaver

    100% this has saved me so many times. I drop ZZZ all over the place in everything I write — whitepapers, client reports, rpg adventures, application code — as a “fix this later” tag

  2. I’d be really interested in hearing more about the interaction between writing and coding. Switching back and forth between the two sounds like trying to juggle squid

on The Skeleton Light

Post a Comment