Update: Find out more about the 50 Years of Text Games book and the revised final version of this article!
His Majesty's Ship “Impetuous”
by Robert Lafore
Released: Late 1980 or early 1981
Developer: Interactive Fiction
Publisher: Adventure International
Language: BASIC
Platform: TRS-80Opening Text:
A WINDBLOWN STORY OF THE DAYS WHEN ONLY THE BRITISH FLEET OF FIGHTING SAIL KEPT THE FRENCH AND SPANISH NAVIES FROM SPREADING NAPOLEON'S TYRANNY ACROSS THE GLOBE.
The Fifth West Coast Computer Faire in 1980 captured the personal computer revolution mid-explosion. Three hundred vendors and a crowd of twenty thousand filled two adjacent San Francisco venues packed with new hardware and software, evidence of an industry that hadn’t even existed five years before but was now rapidly expanding into the lives of everyday people. If you’d been wandering the aisles at that particular Computer Faire, you might have bumped into a man handing out unassuming tri-fold brochures printed on single sheets of colored paper, plugging something that could run on those new home machines called “Interactive Fiction: A new Literary Artform based on Micro-computers.”
How does it work?
The computer sets the scene with a fictional situation, which you read from the CRT. Then, you become a character in the story: when it’s your turn to speak you type in your response.
The dialogue of the other characters and even the plot will depend on what you say.
Interactive Fiction was the name of a company founded the previous year by a longtime programmer in his early forties, Robert Lafore. Cutting his teeth fifteen years earlier on the mainframe DEC PDP-5, Lafore had written an early debugger for the platform, and later worked on programs handling data from high-energy physics experiments at the Lawrence Berkeley Laboratory. But Lafore was also a closet adventurer: he’d sailed a tiny boat with his wife and daughter from San Francisco to Tahiti, and in his spare time written a series of nautical-themed novels. When he joined the microcomputer revolution himself, purchasing a Radio Shack TRS-80 in 1979, he’d seen some of the primitive games then on offer and was unimpressed. Squeezing the best mainframe adventures onto microcomputers with a fraction of their storage space and memory was an enormous challenge that companies like Adventure International were only just beginning to tackle. Lafore decided he could do better by doing something simpler. Rather than simulating a complex world model and hooking it up to a parser that could understand dozens of commands, he would take inspiration instead from one of the very first programs in text game history: the grandmother of all chatbots, Eliza. He would create a program that pretended to listen to what you were saying.
HIS MAJESTY'S SHIP "IMPETUOUS" SLIPPED SOUNDLESSLY INTO THE BAY ON THE LAST OF THE DYING WESTERLY. IN THE TWILIGHT CAPTAIN REED COULD JUST MAKE OUT THE SPIRE OF ROCK MARKED ON THE CHART AS A LANDMARK. SLOWLY THE ROCK CAME IN LINE WITH THE DISTANT PEAK OF MONT CHAMPIGNON. "LET GO!" HE CALLED FORWARD, AND A SEAMAN WITH A MALLET DROVE OUT THE WEDGE HOLDING THE HAWSER. THE MASSIVE ANCHOR DROPPED WITH A SPLASH AND THE SMOOTH PURPLE SURFACE OF THE BAY WAS BROKEN BY EXPANDING CIRCLES OF DARKNESS. "IMPETUOUS" DRIFTED BACK ON HER ANCHOR AND WAS AT REST. "MR DASHER!" CAPTAIN REED'S VOICE SOUNDED UNNATURALLY LOUD IN THE STILLNESS OF THE BAY. "I'LL HAVE THE SAILS CLEWED UP--THEN GIVE THE MEN THEIR SUPPER..." ..."SHALL I RIG THE BOARDING NETS, SIR?" THIS WAS THE SAILING MASTER, MR STAYSON, A MAN AS CAUTIOUS AS MR DASHER WAS DARING. ALTHOUGH THE LITTLE BAY WAS ON THE FRENCH MAINLAND IT WAS CENTERED IN A DESERTED STRETCH OF COAST AND THE LIKELIHOOD OF A BOARDING PARTY BEING SENT AGAINST THEM WAS REMOTE. REED TURNED TO MR STAYSON. "WHAT WOULD YOU ADVISE, STAYSON?" HE ASKED. "WELL, IT'S LIKE THIS, SIR." THERE FOLLOWED A FEW MINUTES OF TECHNICAL DISCUSSION BEFORE STAYSON WENT TO RIG THE BOARDING NETS. (PRESS -ENTER- TO CONTINUE) CAPTAIN REED STOOD BY THE RAIL, GAZING ACROSS THE DARK WATER OF THE BAY INTO THE GATHERING NIGHT. THE SHIP WAS UNUSUALLY QUIET. BUT IT WAS TO BE EXPECTED, HE THOUGHT, THAT THE HANDS WERE NOT JOKING AND SHOUTING AT THEIR SUPPER THIS EVENING. THE DEAD MAN ABOARD WEIGHED ON EVERYONE'S SPIRIT. SECOND LIEUTENANT FALLOW, AN EASY-GOING AND INTELLIGENT YOUNG OFFICER, HAD BEEN CUT DOWN THE DAY BEFORE IN ACTION WITH THE FRENCH FRIGATE "JEAN DE BRUNOFF." ... "SIR, SHALL I BRING YOU A CUP OF HOT WINE?" MILLBY, REED'S STEWARD, STOOD AT HIS ELBOW. "IT'S A COLD NIGHT, SIR." MILLBY, A GOOD SERVANT, WAS ALWAYS SOLICITOUS OF HIS CAPTAIN'S COMFORT. REED THOUGHT HOW GOOD THE WINE WOULD TASTE. "YES, A LITTLE WINE WOULD WARM ME UP QUITE NICELY. THANK YOU, MILLBY." "VERY GOOD, SIR." MILLBY HURRIED AWAY. I'M GLAD I SAID THAT, REED THOUGHT. IT MAKES HIM HAPPY TO DO THINGS FOR ME. (PRESS -ENTER- TO CONTINUE) AND NOW IT WAS NECESSARY, REED DECIDED SADLY, TO PICK A SUCCESSOR TO LT FALLOW....
Contemporary players would have read these words on a 12″ black and white television screen in pale block letters, faintly flickering. The PRESS -ENTER- breaks would clear the screen and refresh it with a new “page” of text, rather than allowing it to scroll. Pages were somewhat cramped: the TRS-80’s 1K of video RAM was exactly enough to store 16 lines of text with 64 characters each. The machine also at first supported only a subset of the full ASCII character standard without lowercase letters, one of several temporary regressions to earlier limitations seen in the transition from mainframes to micros.
His Majesty’s Ship “Impetuous,” inspired by the naval adventure novels of C.S. Forester, was Lafore’s fourth “Interactive Fiction” title, and followed a format the earlier games had established. Unlike Zork and most contemporary adventures, Interactive Fictions told a linear story interrupted only rarely by a chance to type. After entering their own name, the player would type not second-person commands, but first-person statements in the voice of the protagonist. Like Eliza, the program looks for keywords in the player’s input; but unlike the digital therapist it maps keywords to hidden narrative choices, like whether to attack an enemy ship and risk exposure or play it safe. The overall story rarely branches, sticking to a seven-chapter spine, but past choices are remembered, altering incidental text or setting up later decisions. Which officer you choose to promote early on, for instance, impacts whether later choices can succeed, requiring the player to remember the strengths and weaknesses of the man they picked and whether he’s right for a given job.
While Eliza had looked for loaded words in the context of a therapy session—words like mother, dream, or sorry—Lafore’s game understood various ways of saying yes, no, or asking a question, as well as keywords specific to each particular interaction point. A prompt might ask you to choose which officer to promote—the loyal but accident-prone Lieutenant Beagle, or the talented yet calculating Lieutenant Wiley—by looking for inputs containing BEAGLE or WIL (the latter presumably abbreviated because of various ways the name might be misspelled). While the keyword matching was technically simple, Lafore’s careful authoring and framing of choices often worked to create a surprisingly compelling illusion of collaboration. One of his key insights, in contrast to parser-driven games, was to often continue the story even if the input hadn’t been understood. Compare the below to the end of the previous excerpt: here the game doesn’t recognize any words in the input as either a yes or no, but carries on regardless, missing only a bit of commentary on the choice:
REED THOUGHT HOW GOOD THE WINE WOULD TASTE. "REGRETFULLY, MILLBY, I MUST DECLINE," REED SAID. "I SHOULD STAY SHARP JUST AT PRESENT." "VERY GOOD, SIR." MILLBY HURRIED AWAY. (PRESS -ENTER- TO CONTINUE)
While in parser adventures the player controls their character’s every move, Lafore’s games focus on moments where contributing would be interesting or challenging. They prioritized momentum over correct input, and long passages of prose over a rhythm of continuous interactions. The result is different from a parser-driven game, in some ways similar to the model that would be popularized by Choose Your Own Adventure. But a key distinction was that the range of possible choices could be hidden. While this could be frustrating, it could also intrigue. Anything might be possible at any given prompt.
Lafore had been writing Interactive Fictions for a year by the time Impetuous was released, and had honed his craft considerably. The simplicity of the code left far more room on disk for prose, making his games stand out from their detail-starved competitors. It also helped that his games required the greater storage capacity of the TRS-80’s add-on floppy drive, giving them a total of 87K for their program instructions and text. While other games used most of that space for program instructions, Lafore’s approach let him use almost all of it for writing. His paragraphs of story are especially impressive compared to contemporary microcomputer games like Adventure International’s:
I'm in a Beach by ocean. Obvious exits: South, East, West, Down. I can also see: Sand - Large stone head - Edge of impenetrable jungle
By comparison, Impetuous:
IT WAS A PERFECTLY CLEAR APRIL MORNING, WITH A WARM SUN AND A SKY OF A DEEP CERULEAN BLUE. THE GRAVE WAS ABOVE THE HIGH-TIDE MARK ON A BEACH TUFTED WITH SPARSE GRASS. A FEW YARDS FARTHER INLAND THE CLIFFS OF THE SHORELINE HAD COLLAPSED OVER THE EONS, LEAVING A JUMBLED PILE OF BOULDERS AND INTRICATE MAZE-LIKE RAVINES, WHICH RAN INLAND AS FAR AS THE EYE COULD SEE.
And while characters rarely spoke at all in most other games of the time, Lafore’s were awash in dialogue from both player and NPCs. It was technically unnecessary for the player to write out long responses to a prompt—the game only cared about matching keywords—but the instructions encouraged you to embody your role, and some players and reviewers warmed to the idea. “If you have any love of story-telling,” wrote one, “you’re more likely to reply in full sentences, befitting your station as a character.” If you played along, after pressing enter there’d be nothing on-screen to distinguish your words from Lafore’s. They would flow together into a continuous story.
Indeed, many of the prompts in Impetuous exist purely for roleplaying: under the hood, the game doesn’t check them for any keywords at all, though the player doesn’t necessarily realize this. These choices often come at moments where the content of your words matters less than the thought that went into writing them: whether finding the words to comfort a grieving sailor, considering your closing statement at a court-martial, or just indulging in that favorite early computing pastime, typing in swears:
REED, ASTONISHED BY THE SPIRIT WITH WHICH THE ENEMY SHIPS ATTACKED, UTTERED THE SALTIEST OATH HE KNEW: "DASH IT ALL!!" THE REMARK CAUSED MILLBY, APPROACHING WITH A BOWL OF CHICKEN SOUP FOR HIS CAPTAIN, TO TURN PALE.
The whirring of the floppy drive after entering each response furthered the illusion that the program was analyzing your words and recalibrating the rest of the story to align with them. Sometimes, in a limited way, it did. Free to experiment beyond the fixed format of verb/noun commands, Lafore at times created choices that used other methods for judging a player’s input than keyword matches. The length of a response could be tested, with characters deeming an utterance too short or too long:
"HE CERTAINLY DOES RAMBLE ON AND ON," MUTTERED AN AIDE-DE-CAMP SNEERINGLY, UNDER HIS BREATH.
At other times, an input that omits a particular word might provoke an extra response before any other keywords get resolved, as in this admonition from an admiral:
"YOU WILL ADDRESS ME AS 'SIR,' CAPTAIN. A SERIOUS BREACH OF ETIQUETTE, BUT I WILL OVERLOOK IT THIS ONCE."
Lafore enabled this flexibility through a tight set of BASIC subroutines handling input parsing and string printing, leaving the main code flow to consist almost entirely of story text. The printing subroutine included a preprocessor that could swap in character names or punctuation, avoiding awkward inline string processing:
5230 C$= "#I'LL TAKE MY PISTOLS,# #1 HAD TOLD HIM HARSHLY"
"I'LL TAKE MY PISTOLS," REED HAD TOLD HIM HARSHLY
A “page” of text would be assembled by writing into one of four ordered slots, sometimes conditionally: the variables A$, B$, C$, and D$. One page might assign the bulk of its text to B$, but put a response to the previous choice in A$ as a lead-in. C$ or D$ might then be used for extra text that referenced a choice made earlier in the story. This somewhat cumbersome assembly process was an artifact of the lack of easy word-wrapping on the TRS-80: line length, especially for dynamic text, had to be carefully managed. Each possible fragment that could go in one of the four variables was designed to fill one or more whole lines exactly or end a paragraph, so there would be no awkward gaps at the ends of lines no matter which combination of texts had been selected. Lines that mentioned a variable character name were capped at 52 characters, not 64, to allow for a name up to 12 characters long to fit on them.
Parsing the player’s input also happened in a tidy subroutine that stripped punctuation and looked for synonyms of the three basic choice types (yes, no, or asking a question). Further matches could be handled inline with the BASIC command INSTR (“in string”), which returned the 1-indexed position where a given string could be found inside another, or 0 for no match. A value greater than zero resolved to true, allowing a single line of code to add conditional text if a given word or words were detected. The following adds some humorous color if you tell steward Millby you’ll take supper in your cramped quarters:
5873 IFINSTR(I$,"CABIN")ORINSTR(I$,"ROOM ")ORINSTR(I$,"QUARTER") A$=" #IN THAT TINY CABIN?# MILLBY LOOKED HORRIFIED. #IF YOU SAY SO, SIR.#":
Writing for the system was certainly constrained, but its predictability let Lafore turn his attention away from debugging a simulation—which authors of parser games spent so much of their time doing—to writing interesting situations for the player to respond to. Early in Impetuous, the player faces a choice of whether to put a young sailor to death for a treasonous offense, or show leniency and risk further eroding shipboard discipline. But the game hints a third choice might be possible. In fact there are four potential outcomes, and coming up with one of the less obvious solutions feels as satisfying as solving a traditional adventure game puzzle—perhaps more so, since you get to enact it in your own words in an expressive performance.
Lafore found a distributor for his games in Adventure International, which had become one of the earliest successful champions of text adventures for microcomputers. They advertised his Interactive Fictions aggressively to enthusiasts alongside their own adventures during the first few years of the 1980s. Lafore himself was a passionate advocate for his new medium, seeing a bright future that stretched far beyond text:
Technology will soon permit Interactive Fiction to become a verbal medium, as synthesized speech and speech recognition techniques eliminate the need for typing and reading. The user will be able to actually speak with the other characters in the story. Later, holography and animation will permit the user to “see” the characters he is talking with, and we will have Interactive Movies!
Imagine: Pretty soon you’ll be able to play Bogart’s role in Casablanca—or just inject yourself into the story and slip off with Ingrid Bergman... make Shane come back... convince Dorothy to stay in Oz.
Lafore made a case that his games were superior to parser-based text adventures. While early game ads often ran to the hyperbolic, Interactive Fiction may have been especially guilty:
You talk to the characters and they talk back to you, and you can say—type—anything you want. In adventure games (at least the traditional ones) you’re restricted to two-word sentences: “Go north,” and so on. In interactive fiction you can say whatever you like.
Is it a game?
No. In a game the situation is rigidly defined and you can select from only a limited number of responses.
In truth, though, Lafore’s programs often didn’t look at even one word in the player’s input, let alone two. They were even more “rigidly defined” than traditional text adventures, even if their interface made that rigidity more obscure: while you could certainly type “anything you want,” you definitely weren’t certain to be understood. Impetuous can sometimes be magical, but it can just as often be frustrating, especially when requiring a certain kind of response before the story will continue:
OF COURSE THERE WAS THE POSSIBILITY THEY COULD LAY ALONGSIDE ONE OF THE BIG ENEMY SHIPS, BOARD HER, AND PERHAPS EVEN CAPTURE HER. WHAT AN INSPIRATION THAT WOULD BE TO THE BRITISH FLEET! BUT WOULD THIS INSPIRATION BE WORTH THE CASUALTIES? THE INEVITABLE MASSACRE? "WE WILL TAKE ON ONE OF THE SMALLER SHIPS FIRST, CREATING A DIVERSION THAT WILL DRAW THE OTHERS TOWARDS OUR FLEET," REED SAID. "THAT'S TOO COMPLICATED FOR ME, SIR," WILEY SAID. "WE MUST ATTACK, SIR," DASHER SAID. "WE MUST!" "ON THE CONTRARY, WE MUST BACK OUR SAILS," STAYSON SAID. "GENTLEMEN, WE WILL DRAW THEM INTO A TRAP." "WE MUST ATTACK, SIR," DASHER SAID. "WE MUST!" "ON THE CONTRARY, WE MUST BACK OUR SAILS," STAYSON SAID. "GENTLEMEN, WE WILL FIRE AT WILL, THEN." "WE MUST ATTACK, SIR," DASHER SAID. "WE MUST!" "ON THE CONTRARY, WE MUST BACK OUR SAILS," STAYSON SAID.
Reviewers of Lafore’s games often noticed the limitations of the keyword approach. “A shadow frequently falls betwixt the delivery and the vow,” wrote one (unusually poetically for an ‘80s game review) about the gap between the system’s reach and grasp. Another wrote that the Interactive Fiction games “suggest, more than fulfill, the possibilities of the form,” and dinged them for having the same price as parser games despite a much shorter playtime, with less time spent fiddling with puzzles or lost in mazes. Their touted replayability was also called into question: longer passages of prose were less amenable to rereading over and over than the punchier, functional text of a typical game.
Lafore would release one further Interactive Fiction title after Impetuous, but by late 1981 the experiment was fizzling out. Adventure International soon bundled all his games together in a single package for $29.95, then $19.95, then stopped selling them altogether. “They sold all right for a while,” Lafore later recalled, “but eventually the novelty wore off and I needed a new career.” He found one that combined his love of writing and computers in a different way: as a bestselling author of accessible programming textbooks. While he never returned to computer games, the term he invented—interactive fiction—would become co-opted by other creators of literary text games as a more serious alternative to “text adventures.” It is still in common use today, having named the genre Lafore had hoped to replace.
Though largely forgotten, Lafore’s programs are worth remembering for their glimpse at a path not taken in the design of literary games. A world model with a parser would become the standard engine for text games in the 1980s and for decades afterwards, but is by no means the only engine possible. Game historian Jason Dyer writes that Lafore’s Interactive Fiction today “feels like a map to some hidden shell—covering new possible worlds of gameplay—yet to be cracked open.” When computer visionary Ted Nelson reviewed Lafore’s games in 1981, he found them more intriguing than the many Zork clones filling up the booths at computer expos. “Bob Lafore is obviously a talented writer with a nice command of atmosphere, fictional action and structure,” he wrote; “not content to be merely a swell teller of conventional tales, we can be glad he favors us with an entire new system of interactive writing.
“Never mind the swords and sacks of souvenirs,” he added in the review’s last paragraph: “I’d rather curl up with a good interactive story.”
Next week: when an Australian university student is offered $10/hour to write “the best adventure game ever,” she adapts a beloved book into an early classic of emergent behavior.
You can play “Impetuous” on a TRS-80 emulator (you may need to wait some time for the game to first appear) or download the very readable BASIC source code from a French archive: click the “Télécharger” button. Major sources not linked inline include the 1983 book “Genesis II: Creation and Recreation With Computers,” an OMNI article on interactive stories from the same year with the glorious title “Call Yourself Ishmael,” and Jason Dyer’s blog Renga in Blue, where I first encountered Lafore’s work (and many other unsung classics besides).
I was poking through the linked brochure from the Computer Faire and found a Buckaroo Banzai game I had never heard of. Can't wait to try it out!
Also wanted to tell you how spellbound I am by these stories. Just completely enthralling! Thank you for this!