Update: Find out more about the 50 Years of Text Games book and the revised final version of this article!
Scents & Semiosis
by Sam Kabo Ashwell (as Heavy Petal)
with Yoon Ha Lee, Cat Manning, and Caleb Wilson
Released: March 9, 2020 (Itch.io)
Language: Inform 7
Platform: Vorple/WebOpening Text:
There are other perfume-boxes, other lists, sharply curated according to audience. You allow yourself a degree of sentiment in their selection, but that too serves a public purpose. This collection—messy, unfashionable, incoherently themed—is an entirely private matter. A giant’s secret heart.
Each scent brings back memories that once meant something important. They might still. But scents change their character as they slowly break down, and history moulders unless given air. Once in a while you clear an evening, unlock the chest, and unstopper your old selves to see what they are to you now.
Text games have always promised one key difference from traditional prose: the chance that each reader’s journey might in some way be unique. Games can realize this dream with well-tended paths through carefully trimmed gardens of possibility, or invitations to explore less curated meadows and glens, even at the risk of getting lost. The rise of GPT and titles like A.I. Dungeon are something of a nuclear option for making such a garden: like Star Trek’s Genesis Device which burned up worlds with the fires of new life, they bring unbridled creation but scant control. In the face of such power, older methods for nurturing possibilities might seem almost quaint, like a master gardener taking months to plant, tend, and nurture each sprout, growing through painstaking labor what an automated system might with far less effort and thought. Yet the old ways have their charms. The gardener’s harvest is uniquely theirs, marked with indelible fingerprints that leave a record of intention in the crop: green shoots grown by someone and for someone, human through and through.
Scents & Semiosis is undoubtedly a game that was grown. In it, you take the role of a perfumer thumbing through a collection that samples your life’s work, reveling in the memories each scent brings to mind and the associations it suggests. The game’s scope is deliberately small, encompassing only a handful of lingering moments. It’s “meant to be brief, densely-flavoured, and more than a little indulgent,” the author writes, “like a very tiny box of very nice chocolates or a liqueur that you only need a few sips of.” And yet it can be returned to again and again, because each bottle, perfume, and memory comes from an enormous reservoir of hand-crafted procedural text snippets and carefully curated rules for assembling them.
“You run a hand through the vials,” the game describes, “as though dangling your arm from a boat to touch the water, and pick out one, two, a third, for any reason or none.”
an obsidian bottle, emblazoned with the insignia of Bernicia
a blue glass jar [click]
a bottle set in a pewter barretteFive kinds of musk, clove, heart notes of juicy caraway and languid oleander; silver rose. This one was purely commercial: the concept piece for a line of top-shelf car fresheners. You specifically required a clause in the contract to prevent them from crediting you for it.
Each perfume gives opportunities to reflect on what the scents comprising it might suggest, and why you chose them for this mélange:
rose feels like ephemera complicated by opportunity
caraway is suggestive of idle art
clove feels like movement leading to impasse
rose might imply ventures
None of these feel right. Reconsider. [click]
Yet as with the bottles and perfumes, the suggestions aren’t fixed. The last option lets you regenerate them, the options assembled anew by a complex routine linking scents, themes, language, and associations:
caraway is suggestive of crisis despite craft [click]
clove could suggest art
oleander could mean perfect aesthetics
caraway is suggestive of absence turning to recognition
None of these feel right. Reconsider.
This perfume isn’t worth keeping.Caraway for crisis despite craft. All right.
It’s early, yet. Let’s see what else:
a green glass flask with a swing-top closure
an art deco vial decorated with ormulu and fluorspar
a pink glass jar marred by many small abrasions
Bottle by bottle, memory by memory, meaning by meaning, Scents & Semiosis lets your character build up a palette of identity: the unique savor of a personal history. When you’ve had enough, the meanings you chose are brought together:
caraway for crisis despite craft
cherry orange zest for doomed anger
quince for fine detail
amber for friendship despite exhaustion
tea for reluctant passion
soursop for irrational attraction
lavender for regretNot a scent that you could construct in a bottle. And not the only version of your past. But you feel the shape of it, and it’s what you choose for now.
Procedural content generation—using an algorithmic process to create more outputs to a system than a human maker could practically write—has been present in games from the start. Originally this was by necessity: early computers had such limited storage and memory footprints that a game’s worth of content was too big to fit in them. Random variation allowed replayability, too: Hunt the Wumpus used pseudo-randomness to distribute hazards and enemies across a fixed map, making each game different; while Super Star Trek generated a galaxy of sectors for each playthrough with randomly scattered Klingons and stars. 1980’s Rogue and its successors began a tradition of more deeply generative worlds, reaching glorious apotheosis with games like Dwarf Fortress and Caves of Qud. At the core of many of these generative systems was a simple technique of nested lists, each of which might link to another list as one of its possible expansions: games like Nested are pure distillations of this approach, delighting in the exploration of bottomless chains of permutation sprung from simple seeds.
This last technique had been formalized in the 1950s by linguist Noam Chomsky as “context-free grammars,” sets of rules for recursively expanding one symbol into others. Such a structure could define everything from the valid syntax of a programming language to a procedure to generate plans for new houses in the style of Frank Lloyd Wright. In the domain of generative text, context-free grammars could transform high-level plans for a sentence into more and more specific sub-plans, bottoming out in specific pieces of text to instantiate them. A grammar for a random greeting, for instance, might look like this, with links to other asterisked symbols wrapped in brackets:
*Greeting: "[*Hello], [*friend]."
*Hello: "Greetings", "Hello", "Hi", "[*Extended Hello]"
*friend: "buddy", "friend", "pal"
*Extended Hello: "Such a pleasure to make your acquaintance", "I'm delighted to meet you"
When expanded, *Greeting might then produce outputs like “Hi, buddy” or “I’m delighted to make your acquaintance, friend.” As a grammar becomes more complex, with reusable symbols and deeply nested chains, it can produce enormous variety in its output, while remaining under the control of the author who creates it. The technique becomes even more powerful when individual random choices can influence others: one implementation might let the random expansion of “Extended Hello” set a “long-winded” flag that might then influence the choice of other pieces of content.
In the mid-2010s expansion grammar-based content saw a surge of popularity due in large part to the debut of a new tool for easily defining it, Kate Compton’s Tracery. A friendly browser-based editor and a flexible, open-source JavaScript implementation made it easy to incorporate Compton’s tool into ongoing projects, and soon Tracery was powering everything from Twitter bots to generative art exhibits. When Sam Ashwell set out to create Scents & Semiosis, he used a reimplementation of Compton’s program (in a code section called “I Can’t Believe It’s Not Tracery”) as the foundation for his text generation system—though it would end up being only one part of a more elaborate meaning-making machine.
Ashwell had been active in the interactive fiction community since the 1990s, earning a reputation as someone who thought deeply and wrote eloquently about the medium and its potential. His games, typically unique experiments rather than orthodox epics, “always seem to be from a parallel universe where IF developed in wildly different directions,” one reviewer wrote. “They don’t ‘fit in’ with usual IF tropes.” 2012’s Olivia’s Orphanorium, a Victorian satire by way of resource-management parody game, is a typical example. In 2017 he’d created Apocalypse Fuel, a standalone generator to make locations and characters for the tabletop roleplaying game Apocalypse World. He wrote it in Inform 7, a familiar language for making parser-based text games; though it was an odd fit for a project that had no parser and was not a game. But the language had built-in support for defining complex text variation, including the crucial ability to nest expansions:
"Zorro strides by, [one of]looking purposeful[or]grim-faced[or]deep in thought[or]suppressing a yawn[or]scratching his ribs[or]trying to conceal that he has cut himself shaving[as decreasingly likely outcomes]."
To say hello: say "[one of]Greetings[or]Hello[or]Hi[or][Extended Hello][at random]." To say Extended Hello: say "[one of]Such a pleasure to make your acquaintance[or]I'm delighted to meet you[at random]".
Ashwell created a web interface for Apocalypse Fuel using Vorple, an Inform 7 extension that let authors craft web browser interfaces for their games to supplant or replace the traditional text-only parser: again with readable natural language syntax.
open HTML tag "div" called "firstpetal";
place an image "heavypetal2a.png" with the description "Heavy Petal", centered;
close HTML tag;
place a link to the command "begin" reading "Play", without showing the command;
scroll to the end of the page;
wait for any key;
With Vorple and his Inform 7 Tracery port, Ashwell had both an elegant front-end and back-end for experimenting with procedural text. For a follow-up project he thought he might try making something for NaNoGenMo, National Novel Generation Month: an annual event since 2013 that challenged procedural text folk to write code in thirty days that could produce a novel’s worth of text. But Ashwell’s concept soon grew into something more personal: a gift for long-time friend and fellow interactive fiction author Emily Short, “according to an approach she has spoken of fondly: crafting a game for a target audience of one.” As befitting a thoughtful gift, Ashwell didn’t want anything too bulky or complicated: “I wanted something that could be consumed in small sessions and with only gentle effort; I didn’t want playing it to become a chore.” He also set it in the kind of parallel world he knew they both loved to explore: one less drab and more piquant than our own, filled with hints of evocative histories and intriguing cultures.
Short had created her own such worlds, often dabbling also in procedural text: more recently, she had been exploring what it could do in isolation, not just as a piece of a larger game. The Annals of the Parrigues was a non-interactive book—a travel guide to a fictional country—written in collaboration with a handcrafted generator. As she fleshed out the book’s setting, she came up with a thematic framework akin to something like the four elements or suites of Tarot in our world: a system for meaning-making that both she and her generator could structure concepts and descriptions around. She eventually developed an iconography based on five symbols—Mushroom, Egg, Beeswax, Venom, and Salt—each with a set of associations and ideas that together helped sketch in an underlying consistency for a fictional culture.
But while meant to be pure worldbuilding, Short realized the framework could also describe different techniques for procedural content generation. She called them the Five Principles: “They cannot be observed simultaneously,” she wrote, “or with equal attention at all times.” Mushroom implied unrestrained growth and fecundity, systems less concerned with the quality of individual passages than their effect on the whole: useful for generation techniques “unapologetic about repetitions” and more concerned with quantity than quality. Venom meant brightly colored, striking, deceitful, surprising: systems that varied text in places more likely to dangerously startle than go safely unnoticed. Beeswax was busy, warm, chaotic, diverse: more interested in seeding generation with text corpora filled with conflicting and idiosyncratic voices, or passages hand-written for particular bespoke situations. Finally, Salt signified dry, crystalline regularity, clean techniques in which the mechanism shone through; and Egg meant the elegance of living vitality and nuance, suggesting systems designed for collaboration with a flesh-and-blood author adding their unique organic spin.
Ashwell loved Short’s framework, and decided his project would be very Beeswaxy: “lots of small, steady, incremental, unglamorous additions, list-sifting, running your antennae over all the parts.” It would be organic and heterogeneous, filigreed and filled with unique phrases that might only appear once, or even less: “Part of what I love about parser that’s often lost in hypertext IF,” he wrote, “is the sense of weird discovery, of finding something amazing that you didn’t have to find and might not have.” The authoring would also keep in mind the principles of Venom, allowing for surprising, interesting juxtapositions: “It’s important, in procgen [procedural generation], to avoid things getting over-determined, to leave space for the fortuitous.” While the text would aim to seem as elegant as something hand-written, it would allow for interesting imperfections to creep in, fashioning “hopeful monsters rather than exactingly-bred show animals.”
Time for something else:
a smoky glass flask with a label that has been erased with black marker
a black lacquer bottle
an obsidian flask [click]Lavender, coconut, gunpowder, three kinds of amber, sacramental soursop, raw honey and balm of Mecca. The scent brings back memories of Fillouch, who you made a promise to at Akala Annex.
amber is suggestive of things unexpected
balm of Mecca might mean mercy in tension with effort
coconut feels like deliberate honesty
raw honey is suggestive of passion which causes organisation
None of these feel right. Reconsider. [click]
Ashwell went to great lengths to ensure his system’s outputs would be aesthetically pleasing more often than not, but also recognized that in a collaboration with a generative system, embracing the unexpected was not just a necessity but a boon:
A huge problem in procgen output, generally, is the need for filtering, curation. Much of what procgen produces is rubbish and it takes human work and human taste to pick out the gems; in a lot of games, that makes run-time procgen elements a liability. The big trick of Scents is that it enlists the player to do that curation work, and calls it play.
As Ashwell began the project, a core system emerged for generating perfumes based on the fundamentals of real scent design, which involves a combination of top, heart, and base notes. He was more concerned with evocative suggestions than strict accuracy: “people who intimately understand perfume are likely to laugh a lot at the outputs.” But at first the project failed to gel into a satisfying experience. It was “just a pretty text-generating toy... I wanted this to be a bit more than that, something that was played rather than passively absorbed.” The key spark came when he added a system that associated different scent-notes with meanings that the player could take part in selecting. To fully explain this, we need to delve deeper into how the game’s generator works.
Perfume descriptions originate with a list of “structures,” templates for kinds of sentences which might describe them.
"[pop scenttops][pop scenthearts][pop scentbases][if a random chance of 1 in 7 succeeds], [pop hintphrases][end if]"
Each top-level structure can then expand into its own set of structures for each possible component of the description:
scenthearts is a list of texts that varies.
scenthearts is {
"heart [one of]notes [or][purely at random]of [scentpop heartnotes] and [scentpop heartnotes]; ",
"[scentpop heartnotes], ",
"[scentpop heartnotes], ",
"[scentpop heartnotes], ",
"[pop multiphrases], ",
"[pop multiphrases], [scentpop heartnotes], ",
"[scentpop heartnotes], [scentpop heartnotes], "
}.
But as the expansions drill down toward individual words, selection becomes guided less by randomness than by mechanisms to suggest internal consistency. First, a perfume might be given one or two themes, which make it more likely that matching descriptors, connectors, or adjectives will be used when describing it:
Woodland is a theme in startroom. The twist of woodland is {"dank", "dirty", "feral", "fire", "forest", "earthy", "green", "mouldering", "murky", "organic", "overgrown", "prickly", "tangled", "tranquil", "vegetal", "verdant", "wild", "woody"}.
The composite of woodland is {"blooms amongst", "growing amongst", "intertwines with", "interwoven with", "tangled with", "rich with", "in a bed of"}.
The phantpre of woodland is {"arbor", "bear", "boar", "bird", "bog", "bough", "brush", "buck", "deer", "duck", "elf", "fae", "fox", "glade", "goose", "hog", "leaf", "marsh", "mire", "mist", "moss", "oak", "rain", "shade", "soil", "stink", "tangle", "tree", "willow", "wolf"}.
Themes can also have “resonances,” abstract concepts to which they connect. Woodlands resonates with solitude, nature, and growth; the season of spring with beginnings and fun. Resonances in turn can affect descriptive text but also the memories and themes associated with each scent, leading to a system that tries to tie the elements of each perfume’s description together.
an amber glass bottle with a pinecone stopper [click]
Melancholy lavender, rich cassia, earthy whiskey, four kinds of moss. You made this for your father on his deathbed.
lavender is suggestive of persistent disappointment
cassia might suggest completed things
whiskey feels like dissolution
whiskey might stand for fading tragedy
None of these feel right. Reconsider.
Here a theme for the season of fall suggested the pinecone stopper, the amber glass, and the adjective “earthy”; fall triggered associations with melancholy, loss, and endings, which in turn supplied the dying father and the associations with tragedy and dissolution. The generation is still random, but the themes and associations constrain the output into a more consistent, plausible whole.
The memories each perfume might suggest came to comprise an increasingly large portion of the system. Memories could involve gifts given or received, jobs or favors rendered, festivals, friends and lovers, and more; each with their own elaborate, bespoke generator. Many of these spun off their own generators to assemble fractal nests of carefully crafted details: worldbuilding rendered in the name of an opera or the type of cloth used for a corset. Each of the nested chain of lists below, parts of the code for generating memories about good times with friends, has been truncated from its full length in the source code—often considerably:
groupmainact is a list of texts that varies. groupmainact is {
"when [one of]the two of [or][purely at random]you [one of]broke[or]snuck[or]talked your way[purely at random] into [one of][pop landmark][or][pop garden-names][purely at random][m mischief][m trouble][m fun][pop groupsting]",
"when you took a [pop boatkinds] [one of]upriver[or]downriver[or]out on the water[purely at random][pop boat-bullshit][m fun]"
[...]
}
boat-bullshit is a list of texts that varies. boat-bullshit is {
" [pop boatdetail][one of],[or][purely at random] and [pop boatconclusion]",
" [pop boatdetail]",
" and [pop boatconclusion]",
" [pop boatdetail], [pop boatconclusion], and [pop groupdetails]",
" [pop boatdetail] and [pop groupdetails]",
"[one of] and [pop boatconclusion] and [pop groupdetails][or], [pop boatconclusion] and [pop groupdetails][purely at random]",
[...]
}.
groupdetails is a list of texts that varies. groupdetails is {
"talked [one of]earnestly[or]endlessly[or]excitedly[or]intensely[or]shit[purely at random] about [pop convtopics][m debate]",
"made [one of]filthy[m lust][or]obscure[m academia][or]tasteless[or]extremely domain-specific[m academia][or]extended[or]inside[or]allusive[purely at random] jokes about [pop convtopics]",
"drank [one of]wine[or][pop oddbooze][or][pop redwines][purely at random][one of] that neither of you properly appreciated[or] that neither of you could really afford[or][purely at random]",
[...]
}.
oddbooze is a list of texts that varies. oddbooze is {"Abhainn Dearg", "aguardiente", "akvavit", "amaretto", "amari", "Aperol", "applejack", "anisette", "Ardbeg", "Armagnac", "arrack", "baijiu", "Bärenfang", "boukha", [...],
"tsikoudia", "zivania", "[pop redwines]", "[one of][pop fruits][or][pop allbasicscents][purely at random] [one of]vodka[or]liqueur[or]brandy[or]schnapps[purely at random]", "[pop fruits] cider"}.
Ashwell enlisted the help of three friends from the interactive fiction community, “a few authors whose style I thought would be a good fit,” to help expand the scope of his generative space: Yoon Ha Lee, who’d begun his career writing interactive fiction and was now a successful novelist; Caleb Wilson, another longtime community member; and Cat Manning, a new friend and rising game industry star who also offered to take on the role of a producer, helping keep Ashwell’s hobby project on track. Each contributed new ideas—memory seeds, scent templates, evocative adjectives—which inevitably suggested new word lists and new generators. The changelog preserved in a source code comment hints at the many hand-tweaked factors that would come to define the project’s unique flavor:
* NPCs can now recur across memories
* added a two-stage check that avoids (or at least greatly reduces) sexual resonances for memories about students and mentors
* tweaked probability of less-complex memories down a bit
* more tinkering with historical names, inc. monarchs
* will not fix: rosewood is the same as bois de rose, but they *feel* different
* deleted "golf" and "crusader" from the corpus, because we want to imply a better world
* hopefully fixed another a/an bug
Taken together, the massive arsenal of phrases and generators—nearly 50,000 words of them, in the end—is capable of producing an extraordinary variety of bottles, perfumes, and memories of a world richly painted if just barely glimpsed. The code defines twenty-five varieties of lily, thirty-one kinds of citron, fifty-five plots for plays, eighty-two hints of unusual scents like kimchee or popcorn, rarely used; ninety-six kinds of animals that can decorate crests, and one hundred and seventy-eight adjectives for kings, who might appear in the names of empires, as portraits embossed onto bottles, or as indirect patrons. Mathematically, it is laughable understatement to say the same descriptions will never be rendered twice.
The gift was finally delivered, and Short gave Ashwell permission to share it online. There has never been anything else quite like it. Long-time interactive fiction author Victor Gijsbers said it gave him a new perspective on procgen, which he’d never before been a fan of.
I’ve never really seen the point of procedural text generation. What’s the advantage? What does it give you? ...Text generated by an algorithm can surprise me, certainly, but text written by a human author can also surprise me. When I’m looking for material to read, I’m interested quality and not in quantity.
...[But] the beauty and fascination of a piece like Scents and Semiosis is not so much in the texts it generates... rather, it is in the machinery of the generation itself. It is in the thoughtfulness and creativity exhibited by the author when he constructed the algorithm. ...A windmill is a tool for turning grain into flour. But admiring the flour is not the best way of appreciating the windmill.
A text-based and symbolically charged procedural perfume generator had no pre-existing audience, but the game nonetheless found its way to many who appreciated it. It was nominated for a Nebula Award for Game Writing in 2021, alongside more famous and traditional titles. It stands in sharp contrast with the Salty, Mushroomy future suggested by A.I. Dungeon and GPT: rather than infinite stories from an artificial storyteller, a hand-crafted and joyfully singular experience, by one human and for another. And its irregular edges and expansive additions also remind how text games, through their history, have been places sole authors can be auteurs: take risks, try mad experiments, tell gloriously personal stories with an agility games tied to graphics can only envy.
Scents & Semiosis, then, is a good note to end this fifty-year series on: but for more reasons than just these. Its roots are also deeply entwined with the history of text games and interactive fiction. Written at the end of the 2010s in an IF design language from the 2000s that evolved from a 1990s project to reverse engineer Infocom’s story format from the 1980s, which originated in turn in the 1970s with Zork, its technical foundations trace a rhizomatic line back through the medium’s history. Though written in a language built for parser games, it has a hypertext interface like Twine or StorySpace, asking its readers to make decisions like a Choose Your Own Adventure. It reflects the growing maturity of its medium, which from a trunk made from stories of hobbits and spaceships has sprouted new shoots toward tales of loss, of love, of self-discovery and of pain. It continues threads of algorithmic experimentation but also takes care to be told with beautiful prose. It was completed only with help from a community, a recurring theme across this series: from the People’s Computer Center where some of the earliest text game design conversations took place, through the interactive fiction newsgroups, the lifelong friendships born on MUDs and MOOs, and puzzle-solving collectives like the Cloudmakers. It is an odd little game, like so many in this series. Like them, it has been loved.
“This is not a process that you will ever complete,” the ending text for Scents & Semiosis reminds us. The disparate elements you bring together are “not the only version of your past. But you feel the shape of it.” So, I hope, can we. This journey through the first half-century of a medium has been only one route through a garden of forking paths, with many side trips, tragic omissions, and lovely surprises. No one can say where the paths ahead will lead, on through the next fifty years, and the next. But we will find new gardeners there, I’m sure, grafting and growing their own futures for interactive prose.
Next week: Some wrap-up thoughts and the future of the “50 Years” project—there will be a book!
You can play Scents & Semiosis online on Itch.io, where you’ll also find its Inform 7 source code. Sam Ashwell can be found on Twitter @tsawac and blogs at These Heterogenous Tasks : unattributed quotes from him inline were taken from these two posts.
Thank you for this incredible newsletter and soon-to-be book!
This has been an amazing and mind-expanding journey. Thank you!