The science of IF cuisine – what a delicious phrase! That’s what we’re in for here at Keyboard Stadium, I hope. Not merely two well-seasoned games, spiced with words artfully arranged and mechanics ingeniously designed – because we can get words and mechanics anywhere, can’t we – but rather a deep dive into the molecular gastronomy of the process of IF creation itself!
We must commend the Challenger and Iron ChIF alike. At this highest level of competition, they are willing to open their kitchen doors and escort the curious audience backstage, where we can witness their slicing and dicing and boiling and broiling and bug-squashing! Nobody wants bugs creeping into their dishes, do they? Unless the bugs enhance the flavor…
Already, the tension simmers! The Challenger and Iron ChIF, in the challenge itself, demonstrate a keen attention to time and pacing – vital components to any text, but especially interactive text. Length and brevity! Constriction and expansion! Sincerity and insouciance, conveyed by not only the quality but the quantity of their words!
Do we already have, in this preliminary sabre-rattling, a taste of the dishes to come? Has a certain textual aroma begun to waft through the digital bleachers of Keyboard Stadium? This judge suspects, possibly, yes!
But maybe I’m just hungry. When you’re hungry enough, anything can start to smell like food…
I can’t explain why these Judges are coddling you, Iron ChIF and Challenger. We are not here to make friends, gladhand or puff you up. Keyboard Stadium is not a playground, it is a crucible, an ABBATOIR for the unprepared! We Grim 5 are here to shepherd the WORST WEEK OF YOUR LIFE, to subject you and your dishes to impossible scrutiny and woe betide even the slightest misstep. We are your FATES, your FURIES, your Apocalyptic Horsemen. You are not competitors here, you are GRIST FOR THE MILL.
WE ARE HERE TO FLAY YOU AND YOUR CREATIONS BEFORE THE WORLD FOR THEIR AMUSEMENT, AND ALSO CHEW BUBBLEGUM.
All right, but given there’s five of us, I hope you’ll all do War, Death, Famine, and Pestilence, and I can be the Horseman of Middlebrow Entertainment (The Stuff That Takes Great Care To Look Intellectually Respectable And Difficult Without Actually Challenging You Or Any Of Your Convictions)?
In addition to these five and the competing chefs, yet one more role will play a part during the coming contest, that of technical advisor. The task of the technical advisor is subtle yet essential: to provide insight into the development system in use and context for the techniques demonstrated by the competing chefs.
For this episode, our technical advisor is Zed Lopez (@Zed), curator of the Inform 7 documentation and resources post, purveyor of fine resources like the Inform 7 docs web remix, and author of the @inform7tipsmicroblog. As the most prolific reporter of Inform 10.1 issues, he has single-handedly ruined several of Graham Nelson’s weekends, but he taketh away and giveth: as a contributor to Inform, he has added new features and even fixed a couple of those bugs. For contributions to Mad Science soaring beyond common sense or basic decency, Zed has received an unprecedented five Bubbling Beaker Awards.
Judges will be able to turn to Zed for answers to their technical questions about any code that the competing chefs share during the match, and – for your edification – he will be providing an overview of Inform 7’s most unique and powerful features. He may also occasionally point out details of the chefs’ coding that merit special attention, lending his expert eye to those unfamiliar with the language.
Truly the most insidiously fraught of the Horsemen! In hindsight, and with a cheekful of soothing chew, perhaps I came on a little strong there? Maybe we’re just the Cantering Riders of Stern Words and Looks?
>GIVE GUM TO HORSEMEN
Which horsemen, the Horsemen of the Apocalypse, or the Cantering Riders?
>APOCALYPSE
Which rider do you want to give gum to: War, Death, Famine, Pestilence
or Middlebrow Entertainment?
>PESTILENCE
You cannot give gum to yourself. Which rider do you want to give gum to: War,
Death, Famine, Pestilence or Middlebrow Entertainment?
>MIDDLEBROW
He has not asked you for gum. Which rider do you want to give gum to: War,
Death, Famine, Pestilence or Middlebrow Entertainment?
>ENCORM
You do not know her rider name yet. Which rider do you want to give gum to: War,
Death, Famine, Pestilence or Middlebrow Entertainment?
>GIVE GUM TO RIDERS
Which rider do you want to give gum to: CMG, VictorGisbers, jjmcc, mathbrush,
or Encorm.
>ENCORM
You do not know her rider name yet. Which rider do you want to give gum to: CMG,
VictorGisbers, jjmcc, mathbrush, or Encorm?
>RESTART
It is far too late for that, the audience has fully gotten the measure of you.
>GIVE GUM TO ALL
Good luck getting them to chew it.
Middlebrow Entertainment would say that. Then people can just go ahead and keep chewing their gum without changing their behavior and committing themselves to true Famine. Not even the smallest crumb should touch and tantalize the tongue!
I did not realize how strongly we were committing to the bit before I soft-claimed Pestilence! Uh, my tummy hurts? (Wouldn’t be the first time I’ve been called a Disease… )
Sorry @mathbrush, @Encorm, whoever gets stuck with Death is in TROUBLE. I recommend a slow-walk on this…
In that case I’m going to go ahead and claim War. (Sorry, Mathbrush!) I forgot to pack my torches and pitchforks though so I’ll have to find something to make do with.
Unfortunately, mathbrush has passed away on 2/21 after claiming the title of Death. He died happy, knowing that peak fiction would continue to be created in Keyboard Stadi–
Oh wait–
Ah, sorry about that. I had a little trouble, but I got better. Looking forward to the competition!
In 1993, Graham Nelson, a doctoral student in maths at Oxford, posted a couple of project announcements to USENET. On rec.games.int-fiction, Curses, a new game that could be played with any Z-code interpreter and on rec.arts.int-fiction, Inform, the language and compiler he’d created to make it.
Over the next couple of days, he was understandably disappointed by the overwhelming lack of response they received… and then he realized his USENET feed was broken.
It’s not clear that anyone had created a Z-code binary of any length subsequent to Infocom’s shutdown and now, suddenly here was this enormous, well-made game. And not just that, but also the means by which others could make their own. Jimmy Maher called it the start of an Interactive Fiction Renaissance.
And it wouldn’t be the last transformative surprise Graham had in store for the IF community.
On the foolishness of natural language programming
That original version of Inform would grow into Inform 6. In what follows, Inform means Inform 7 wherever a version isn’t specified.
In March 2005, the banner of Emily Short’s Mystery House Possessed said it had been made with Inform 7. This was the first public indication that such a project existed and no further information about it was forthcoming. People reasonably expected some incremental improvements on Inform 6, something comparable to the difference between Inform 5 and Inform 6.
A year later came three more Inform games, Short’s Damnatio Memoriae and Bronze and Graham’s Reliques of Tolti-Aph, along with one provocative hint about Inform 7: it would compile to Inform 6. That wouldn’t be warranted unless they were substantially dissimilar, so no one knew what to expect and not until its release two months later would they find out.
At this late date, it’s hard to convey just how big a surprise they were in for, how big a swing Graham was taking.
Natural language programming is an old idea. In the late 1950’s, Grace Hopper took inspiration from natural language in the development of FLOW-MATIC and its 1960 descendant, COBOL. And if you’ve ever seen COBOL code, you know its fidelity to English rivals that of a based-on-a-true-story Hollywood blockbuster to its inspiration.
Natural language is inconsistent, ambiguous, messy. And computers are literal. They’ll do what you say, but they can’t do what you mean unless you say exactly what you mean. That takes expressing it in a way that’s consistent, unambiguous, orderly. You’d need something as formally precise as symbolic logic… an artificial language.
Sure, conforming the round peg of human cognition to a square hole dictated by the computer’s needs created some obvious pain points, but everyone could agree it beat the alternative. Computer science giant Edgar Dijkstra’s 1978 summation of the conventional wisdom bears the matter-of-fact title On the foolishness of “natural language programming”.
Inform flouts this conventional wisdom.
In Natural Language, Semantic Analysis, and Interactive Fiction[1], a paper accompanying Inform’s release, Graham makes the case that:
The natural language in which to write interactive fiction is natural language
He describes Inform as a practical test of that hypothesis.
A player learns about the things that exist in a game as the game names or describes them. The game also has an idea of which words a player could use in commands to refer to given things. Both of these cases definitively require natural language.[2]
But there’s another involved party that needs a way to refer to the things in the game.
Its author.
What if all three cases of how the author refers to something, how the player refers to it, and how the game’s output refers to it could be specified at the same time by making them the same words by default?
To really show off the extraordinary expressivity on offer, I’ll throw another Inform fundamental, relations, into an example:
The bubbling beaker is on the workbench.
on indicates the (reversed) support relation and the support relation relates a supporter to various things. So this creates a workbench object whose kind is supporter and a bubbling beaker object whose kind is thing and notes their relation, that the workbench supports the beaker. It sets their printed name properties to “workbench” and “bubbling beaker”, respectively. And it adds “workbench”, “bubbling”, and “beaker” to the game’s dictionary as words that could refer to their namesake objects.
And all of that was just seven words. Now, counting brevity as a virtue is a seductive danger in programming: when it’s pursued to an extreme, brevity inevitably comes at the expense of comprehensibility.
What’s truly remarkable is that this code, in casual disregard of inevitability, is as clear and straightforward as can be and as concise as anyone could hope for at the same time.
Writing a program requires decisions about how to organize the concepts you’ll be dealing with. Your choices will end up determining how hard it’ll be later to modify your code to handle some new concept. And no matter how much flexibility you tried to build into it, no matter how much you tried to anticipate future desires, you’re going to end up wanting something that should be easy except it falls so completely outside your program’s model that it could only be accomplished with either a complete re-design or a pile of grotesque hacks[3].
Let’s take an interactive fiction commonplace: books that have some associated text to be output when a player issues a read command. Easy enough! Multiple fruitful approaches suggest themselves. For a procedural take on it, you’d make a subroutine for the reading action and pass the book’s data structure to it as an argument. An object-oriented approach would likely have a book class with a read method.
But what if it’s dark? What if the player character’s reading glasses are broken? What if the evil wizard’s cat is asleep on top of the book?
If you tried to somehow hang all of these special circumstances on the book object or the reading action subroutine, your program would very quickly become a maze of twisty little passages, all different, a surefire recipe for code that would quickly become hard to understand and work with. Trying to debug it would be like fighting a hydra, with three more heads sprouting for every one you cut one off.
The domain of interactive fiction is especially fertile ground for the seeds of exceptions that would grow into weeds threatening to shatter your design’s foundation[4].
So how should one approach it?
Inform’s answer is rules. A rule is a chunk of code that’s in most ways similar to what other languages call a subroutine or a function, along with (optionally) arbitrarily specific conditions for when it does or doesn’t apply. A rule can stand alone, but they’re usually organized into ordered lists of rules called rulebooks. For some rulebooks, the norm is to finish as soon as a single rule is applicable; for others, the norm is to keep going, following every rule whose criteria are met.
When a rule is added to a rulebook, there can be specific instructions about where in the order it should go. Without such instructions, the compiler automatically places rules with more specific criteria ahead of those with more general.
And that’s how Inform is organized. Other than at the very beginning and the very end, a running Inform story just follows the turn sequence rulebook over and over. The scheme sounds simplistic because its premises are simple.
Inform’s Standard Rules then combine simple elements to give rise to a rich and complex structure, a world model with built-in concepts of moving through places full of things to be examined or picked up, containers that can be opened or closed or locked, things inside other things, or atop other things, or that are parts of other things.
The result is a framework allowing one to compose new rules with tremendous power and expressivity. Consider this example suggested by @aaronius:
This fragment implies some things have already been specified, perhaps:
Ownership relates a person to various things.
The verb to own means the ownership relation.
Hatred relates various people to various people.
The verb to hate means the hatred relation.
A thing can be lethal.
A dog is a kind of animal.
and it alludes to other relations and adjectives from the Standard Rules:
The verb to hold means the holding relation.
Definition: a thing is held if the player is holding it.
The verb to be able to see means the visibility relation.
Definition: Something is visible rather than invisible if the player can see it.
Rules provide a way to express all those exceptions that IF are prone to while giving you a fighting chance to avoid making a maze of twisty little passages.
Aaron notes:
I’ve personally never really encountered a language that lets you express complex world simulation concepts like that so elegantly.
When Inform first appeared, creating interactive fiction had just one simple prerequisite: be a programmer. All of the options involved writing code that very much looked like… code. TADS had had an integrated development environment (IDE) for years, but it was still very much a tool aimed at programmers.
Writing With Inform begins (unchanged since 2006):
Interactive fiction is a literary form which involves programming a computer so that it presents a reader with a text which can be explored. Inform aims to make the burden of learning to program such texts as light as possible. It is a tool for writers intrigued by computing, and computer programmers intrigued by writing. Perhaps these are not so very different pursuits, in their rewards and pleasures.
Inform styles itself a design system for interactive fiction. Inform, the programming language, is just one part of that system. As he put it in NLSAIF, Graham wanted:
a radically humanizing interface for the writing of interactive fiction
Programs are stories and their creators authors. The interface takes as its guiding metaphor a literal open book, that most familiar form for interacting with text.
No knowledge of computer programming is initially required.
Let’s consider Starry Void, one of the earliest examples one encounters in Writing with Inform[5]:
The Center Ring is a room.
The magician's booth is a door. "[if the player is in Center Ring]A magician's booth stands in the corner, painted dark blue with glittering gold stars.[otherwise if the magician's booth is closed]A crack of light indicates the way back out to the center ring.[otherwise]The door stands open to the outside.[end if]".
Instead of examining the magician's booth in the Center Ring:
say "It is dark blue and glittering with gold stars. [if the booth is open]The door currently stands open[otherwise]It has been firmly shut[end if]."
Instead of examining the magician's booth in the Starry Void:
say "The booth door is [if the magician's booth is open]wide open[otherwise]shut, admitting only a thin crack of light[end if]."
The magician's booth is inside from Center Ring and outside from Starry Void.
Understand "door" or "of" or "the" or "light" or "crack" or "thin crack" as the booth.
Test me with "examine booth / open door of the booth / in / examine door / close door / look / examine crack of light".
That final Test me line hints at how much business is enabled with just these few lines.
Inform’s interface makes going from reading the documentation to seeing that example to copying its source into the story pane and compiling it to interacting with the resultant tiny game as easy can be.
But there’s more that would occur to a user after that progression. It’s also easy to change it. To add to it. And then one could immediately explore the consequences of those changes. And that would make something else obvious.
It’d also be easy to wipe the slate clean and create your own world.
Inform goes beyond approachable, it’s inviting. It makes you want to do the thing.
An early, persistent objection, unaltered across the two decades since Inform’s release, is that any claim of its natural language promoting ease of use is just smoke and mirrors, that it’s ultimately just another a programming language, with a compiler that’s as literal and unforgiving as any. One still has to figure out how to say things in the exactly right way that it’ll accept.
And truly the objection’s basis is indisputable. Writing with Inform includes a section titled Does Inform really understand English? It begins:
On the ghoulishness of sticking to a bit that’s outlived its usefuless
Twenty IFComps have come and gone since Inform’s release in 2006, and games written in Inform have won fifteen of those. Of the IFDB Top 100 games that don’t predate Inform, vanishingly close to half are Inform games, in other words nearly as many as everything else put together.
Its presence has loomed so large that attempting a modern overview for this esteemed audience, many of whom no doubt already hold an opinion about Inform, was a daunting task.
But IronChIF is not for things that are easy!
@LPSmith, @Afterward, we look forward to seeing how you make Inform your own and the dishes you prepare with it.
Thank you, Zed. A most remarkable language, holding out the promise of a gentle introduction to programming for those who don’t consider themselves technically inclined, and offering a tremendous array of tools to simplify implementation of complex behavior.
Earlier today, the two competing chefs were offered three candidates to serve as challenge ingredient. Each chef was allowed to eliminate one of them, leaving the third as the idea which they must integrate into their final dishes. Now that they have chosen, there is no going back.
The battle will commence in just ten hours, at noon UTC Sunday February 22nd!
That’s a great overview of Inform 7. In my experience, the natural language form makes Inform very, very seductive. Writing with it is – initially at least – tremendous fun. You type some sentences. It reads well. You press a button. And then you have a game! As soon as I see some Inform 7 code, I feel like programming in Inform 7.
There is a stage, of course, where Inform 7 programming can be just as difficult as frustrating as using any other language; when you want to do things that are either complicated in themselves or complicated because they go against the underlying assumptions of the world model or the parser, you’ll still have to figure it all out. And the natural language character of Inform 7 can make it harder to remember the correct syntax, leaving you typing things that seem good, but are just slightly off.
Plus, if you haven’t used the language for a while, can you remember the difference between following a rule and abiding by a rule? (Let alone: anonymously abiding by a rule?) What is the exact sequence of the Before, After, Check, Instead, Carry out and Report rulebooks? Which of those stop the entire sequence if a rule in them succeeds? That’s stuff I always have to look up.
But, and then we return to the positives, even when returning to a project after ten years, you are immediately able to read the code and understand it. No doubt obfuscated Inform 7 code is possible, but average Inform 7 code is eminently readable. And therefore fun to delve into again!
I’m not monogamous. I’ve used other systems – Inform 6, Ink, ChoiceScript – and might use yet others. But Inform 7 is my true love, and I’ll always come back to her.
And now, the threshold of battle has arrived… Three potential challenge ingredients were laid before the chefs, and those three have been winnowed down to only one.
Since the dawn of time, mankind has believed in magic, a word that carries many nuances and connotations. In any sense, however, magic implies the ability to defy expectations, to do the impossible, to amaze, and to surprise… whether this is accomplished by simple trickery or – dare we believe it? – something genuinely supernatural. One who beholds magic at work stands in wonder, sometimes spurred to awe, but the inexplicable soon sounds a note of discomfort: Any adult knows that surprises are not always good.
The selected challenge ingredient was suggested by official Taster @rh, and it has the potential to evoke such deeply-rooted emotions. It reaches back, back to the beginnings of interactive fiction, when such primal archetypes were more commonplace than they are today. It defies my own expectations already, simply by being that which I reveal to you now. Perhaps it bears its own magic, which is already at work.
For this first episode of Season One, the challenge ingredient will be:
a scroll that alters the world around it
The development period has now begun!Allez keyboard!
A scroll that alters the world around it – what a fascinating choice! It’s hard to think of another ingredient with so much raw potential. It could be the focus of a Lord-Of-The-Rings style fantasy epic, the main mechanic in an old-fashioned-puzzle-parser, or even the centerpiece of a wacky comedy, depending on what exactly it does! I’m positively a-quiver with excitement thinking about what our contestants could make with this! And I’m sure @mathbrush could tell us even more about what games have used such an item in the past and how they could inspire the works of art about to be made in Keyboard Stadium!
Of course, the boundless possibility of this ingredient is a double-edged sword – with a limited time frame to work in, one needs to make decisions quickly about what this scroll will be or else risk getting lost in the sauce. Our contestants will need to demonstrate excellent knife skills to pare down the possibility space, and fast, if they want to use it to its fullest extent!