Gamebook store

Showing posts with label The Pillars of the Sky. Show all posts
Showing posts with label The Pillars of the Sky. Show all posts

Wednesday, 7 January 2026

Flags and states in open-world gamebooks

I think it was Mark Smith and Jamie Thomson who first started using keywords in gamebooks. Prior to that, a gamebook might say something like, "If you met the old man in the almshouse and he gave you a piece of stained glass, turn to X." 

You can see the problem. What if I don't remember if I met the old man or not? That's especially likely if I've played through the adventure several times and can't remember whether I met him on this run-through or a previous one.

The other advantage of keywords is that they don't give the game away. The keyword for getting the stained glass fragment wouldn't be GLASS, for example, or even VITREOUS but something unrelated to the story event -- OBLIQUITY, for example. That way, if you come across the keyword without having triggered the event that would give it to you, you have no idea what effect it would have. That's particularly important in open world gamebooks like Vulcanverse and Fabled Lands, though there are cases where it's fine to know why an event is triggered -- getting arrested if you're a wanted fugitive, for example, or being granted an audience with the king because you're the court champion -- and in those cases we typically use a title like Godslayer or Saviour of Iskandria.

Keywords can serve one of two functions. The first is to record if an event has happened. For example, has the player ever met Baroness Ravayne? Once they have, that can't be undone. So in design terms that's a flag. The other use of keywords is to track a state that can change. An example of that would be whether they are an ally or enemy of Baroness Ravayne. Prior to meeting her, neither can apply. But once they are able to enter those states, there could be ways to flip them; you might become the Baroness's enemy, then redeem yourself and become her ally, then do something to make yourself an enemy again.

How many keywords do we need for this kind of set-up? I'll give you an example from The Pillars of the Sky, the fourth book in the Vulcanverse series. We've actually discussed this before. If you want to familiarize yourself with the scenario, here's a short demo version. The gist of it is that the player comes across a valley in perpetual darkness and finds a switch that lets them turn the sun on and off. (Here in London in icy January I could do with something like that.)

I used two keywords. Quell identifies whether the player has found the switch. So that's the first kind of keyword mentioned above, a logic flag. Once you've found the switch, you can't unfind it. The other keyword, Quire, records if the sun is currently on. If you go back to the switch and flip it to the off position, you lose the keyword Quire. Anytime you're in the valley, if you have Quire then the sun is shining, and if you don't it's pitch dark. So Quire records a state.

Typically you want to limit the number of keywords used in a book, as the reader is going to have to check through a list every time a keyword is called. In a multi-book series it helps a bit if the designer uses different letters of the alphabet for each book, as we did in Fabled Lands and Vulcanverse, but it's still preferable not to have too many. Initially I tried to economize in The Pillars of the Sky by only using Quire for the valley with the artificial sun. That meant there was no difference between the sun being off because the player hadn't found the switch and the sun being off because they had found the switch and left it in its original position. Later on I discovered that there were circumstances where it mattered whether the player had found the switch, so I had to bring in Quell too.

A slightly more streamlined (if less aesthetic) solution would have been to have Quire-ON and Quire-OFF as keywords, using ON and OFF to designate substates. Then I wouldn't have needed Quell as I'd be able to infer the state by asking, "Do you have a Quire-* keyword?" -- or maybe, more elegantly, "Do you have any form of Quire keyword?" I wouldn't do that in code as it's cleaner to differentiate the flag (has the switch been found?) from the state (is the switch up or down)? In fact, if the code isn't visible to the player, in an app version for example, I'd have both Quell and Quire-ON/OFF. As you will appreciate, technically I don't need the ON/OFF substates in that case because all conditions can be derived from simple combinations of Quell and Quire:

  • Quell && Quire = The player has switched the sun on
  • Quell && !Quire = The player has switched the sun off
  • !Quell = The player hasn't found the switch

So the only reason for having the Quire substates is the belt-and-braces principle that when debugging it helps to have everything spelled out. Trust me on this -- currently I'm coding all the Vulcanverse books as a web app and O! the bugs!

If you try playing the demo, here's a moment from Workshop of the Gods that gives a hint of how that sunless valley came about:


Friday, 22 November 2024

Cue the sun

Jamie and I have mostly avoided patching the Vulcanverse books once they're published, as obviously it's not as easy to deliver a patch for a book as it is for a videogame. We wouldn't want people who had already bought the book to miss out. If we do tweak anything in the text, we're always careful to make sure that it's backwards-compatible with earlier editions and doesn't invalidate anything that's already established.

Here's an example. The latest version of The Pillars of the Sky has this section:

The only difference from the earliest edition of the book is in the first line of that section. Previously you only got the codeword Quire; now you also get another codeword, Quell. The reason for the patch is that Quire tracks the setting of that switch. If you turn it off you lose the codeword. Turn it back on and you get Quire again.

That was fine, but we realized it would also be useful to record whether you had found the switch, regardless of whether you happen to leave it on. So once you've got the codeword Quell you can't lose it.

The only place Quell is used is in section 1155 of Workshop of the Gods (book 5):

And that works fine even if you have the original editions (which are collector's items now; only a few dozen were sold before the update) and so you never saw the codeword Quell. The patch adds a little more fine-tuning but doesn't break anything -- which is our policy for any changes to these books.

Wednesday, 22 February 2023

Peaks that stretch to the floor of heaven

If you've yet to start exploring the Vulcanverse, a good place to get prepped is over at the Vulcan Forged site where a fascinating new series of posts is providing an in-depth look at the lore of each region of this immersive world. This month it's the turn of Boreas, the icy mountain realm. (Part 1 here and part 2 here.)

A quick recap: Vulcanverse is an open world gamebook series. You can start in any book and travel back and forth between them. So far, so Fabled Lands. The differences with Vulcanverse are that you can explore the world with NPC companions, you get free resurrections (most of the time), and there are many more opportunities than in other gamebooks to permanently change the world by your actions.

Also in contrast to Fabled Lands, the whole Vulcanverse story builds to an epic finale in the fifth book, Workshop of the Gods, which will be released in a few months' time. I've been labouring away at the manuscript for almost a year (you'll never hear me criticize George RR Martin's work rate; I know just what it's like) and I now have over 20,000 words of notes covering the endgame sequence alone. The finished book will be around 1200 sections long, making the whole Vulcanverse series nearly 5000 sections and more than 600,000 words. After this one I might need a lie down.