David Donachie's Website

Skip Navigation

Zenith — A storylet story

In the summer of 2023 @manonamora (and the other members of the Neo Interactives) held the Single Choice Jam, an Interactive Fiction contest for games that only had a single user choice.

My entry was Zenith, a game about climbing an impossibly high tower to try and reach the impossibly distant top. My inspiritations were Italo Calvino's Inivisble Cities, Railsea, the movies Labyrinth and Mirrormask, and Christopher Manson's Maze. It's meant to be surreal, and reflective. The story, such as there is, emerges organically as you ascend the tower, with certain levels/chambers revealing aspects of the narrator's life, his (or her) reasons for being there.

Concept

The big challenge of Zenith, of course, was the requirement for only a single choice. I didn't want to make something linear, and I knew that I definitely wanted to make something replayable, so that required some element of randomness. I conceived of the tower as a place of endlessly entwined routes, of stairs and ladders and lifts and ropes and hidden ways where you could climb a hundred times without ever seeing the same places in the same order. In this way you could climb the tower over and again and still see something different.

Then, when you have gone as far as you could go, you get to make the single choice, a leap of faith towards the true goal, or a descent to try again with some other route. Along the way you can accumulate items based on the levels you have visited, which may alter or unlock certain routes. If you descend the tower you keep the items for the next climb, if you jump and fall ... well you start again from scratch. Of course, the items are themselves no more than a record of the rooms visited — you can't choose not to collect them because only one "choice" is allowed — but they provide a diagetic explanation for how some paths open others.

Narrative Design with Storylets

Successfully executing this design hinged on the use of storylets, a design tool very close to my heart. Storylets are a concept first introduced in Fallen London, and made popular in the Story Nexus engine that drove it. Rather than controlling a narrative with a fixed series of linked passages, storylets break gameplay into distinct segments, each with their own conditions for when they can appear.

I probably don't need to introduce storylets further, but I will, like some sort of demented storylet pusher.

In a blog post explaining its narrative structure, the term "storylet" appears as a definition of "discrete chunks of narrative" (Failbetter, 2010; para. 3). Later clarified as part of a developer diary post, Failbetter Games (2012) described storylets as “pieces of story like mosaic tiles, not pipes or complex machinery. Put them together. Build something wonderful” (para. 11).

— description courtesy of Dan Cox

Emily Short, herself a notable proponent of storylet based design, expanded this definition (in Storylets: You want them) as follows:

[1] there is a piece of content. It might be a line or a whole section of dialogue, it might be narration, it might be an animation or scrap of film
[2] there are prerequisites that determine when the content can play
[3] there are effects on the world state that result after the content has played

If these descriptions feel too highbrow, just think of storylets as being much like a random event system. In this case, one where the whole game is just a sequence of random events with conditions.

Technical Implementation

I have used Storylets in most of my games since I first learned of them, and have evolved my own Storylet engine for use with the Sugarcube Twine format — Mouse Quality based narratives (or MQBN). Zenith uses MQBN v1.2 for all its heavy lifting. Each passage is one level, and one storylet. (The only exceptions are the starting passage, and the passages that make up the final choice/ending.)

Zenith breaks its storylets into four categories:

  1. Normal — levels which can appear anywhere in the tower
  2. Height dependant — levels which can only appear above/below a certain height
  3. Item dependant — levels which require you to have some specific item in your inventory
  4. Time dependant — levels which can't appear on your first climb

The item dependant storylets were put in partly to increase the feeling that the narrative made sense. You find an item in one room, and then it is mentioned again in another. It was also used to increase the sense of variety in climbs. Finding some items (e.g. the military_plan) unlock a whole series of military levels, so that a climb that includes it feels different from one that does not.

The final category, the time dependant storylets, were an important part of how the game ties the narrative to exploration. You can't get the key parts of the story without multiple climbs, even if you were somehow successful the first time.

Here's an example of a standard level:

And one with dependancies:

Because I wanted the story to flow naturally from area to area, each storylet also describes what the route to the level should look like. When you visit a level, the next level is immediately picked, so that the link text can be incorporated into the text.

Final Leap

The chance of succeeding at the final leap is a function of the number of levels climbed, the number of climbs attempted, and the number of items collected, with certain items worth more than others. For example the rope and lantern increase the chance by 1%, while the child's diary increases it by 7%. Items with more relevance to the character's backstory are worth more points, while those that merely unlock new areas of the tower are worth less.

Recording your name

Zenith has one other unusual technical feature, a shared scoreboard. If you make the final leap of faith, you gain the opportunity to add your name to a scoreboard (where your score is based on the number of floors you have climbed). I'm lucky enough to have my own website (the one you are reading this blog post on), which gave me the opportunity for a persistent back end. The scores are stored in a database. A PHP script is called to supply the current list of high scores, and another allows new scores to be record. The only hard bit was filtering the submissions for profanity, hacking attempts, and anything else I needed to not record.

Graphical Design

Perhaps a little more obvious than the subtleties of the coding, Zenith features a fairly striking graphical design, where the storylets you have already visited stack on screen like a literal tower of cards.

Only the top card is "real", representing the current passage. The game generates a set of random rotations when it starts, and displays a card for each previous level using those rotations (to a maximum of 40), and scaling them in both size and colour (using CSS variables and the hsl() function) as they descend.

Each previous card also shows its name when you hover over it — which required me to give a suitably evocative name to every level. I took inspiration from tarot cards and, once again, Calvino, for many of the names.

The other big graphical flourish in the game, which took far more time for (sadly) far less effect, is the radial item menu and its opening and closing animations.

Again, the menu uses CSS variables, and a bit of maths, to calculate where each item should fall in a series of concentric rings, and then uses a CSS scale and transition to animate them. I'd love to say that the labour of love involved was well worth the work, but I don't think it was, and I'm not sure most people ever really noticed the effect.

Conclusions

I'm generally pretty happy with how Zenith turned out, especially when it comes to the graphics and the technical implementation. It could use more floors — after four or five climbs, they get a little repetitive, even though there are 52 levels. It could probably use more story as well, but I'm generally happy with the narrative that's there. Like most of my games, it has only attracted moderate feedback, but the more people than I expected have recorded their name at the end of the climb, so it's certainly been played.