So at our PAX freeplay room, we had this older gamer named Tom wander in. Tom wore a T-shirt from a triple-A zombie game, carried a newly purchased boardgame adaptation of D&D’s Castle Ravenloft campaign setting, and sought us out merely on the strength of our flyers. Clearly, Tom is a renaissance geek: steeped in many traditions, and always learning more. We dutifully got him going on one of the freeplay machines, and he spent about an hour with Alabaster, with only occasional help.
Once when I went to check in on him, I discovered he’d migrated from Alabaster to… the sample game we’d made especially for PAX?! The sample game’s purpose was to illustrate Inform 7 source code, to give the ordinary gamer a taste of computer programming and specifically that of I-F programming. Tom was actually playing the game, and floundering around, trying to EAT JELLYBEANS and DRINK A COKE because these things were in the real room, but not of course in the sample game.
But while scanning his transcript something else caught my eye. In the game, I had changed the command prompt from the > to "You decide to " partly to show that the prompt could be changed, and partly as a way to flag what input was accepted. Tom had entered something like ASK FOR INFORMATION and got a parser question in response – ask who? Unfortunately, then the command prompt appeared beneath, YOU DECIDE TO, and that threw him off, and he was unable to complete the “simple” game for the lack of a noun between ASK and FOR.
Later I grumbled in private that questions that the parser tosses up shouldn’t print my prompt at all. Heck, they should be the prompt. And then it occurred to me that maybe I could make that so. It took all of five minutes. Here’s the resulting transcript, with the code beneath…
[code]
“Prompting Plus” by Ron Newcomb
Include Default Messages by Ron Newcomb.
The billiards hall is a room. “You’re nursing a Scotch in the corner of the billards hall. It seems a game of snooker over yonder got a bit rowdy. The players search the floor for missing balls.” A red ball and a green ball are in the billiards hall.
Table of custom library messages (continued)
library-action library-message-id library-message-text
– 49 “[blank command prompt][bold type]Which will you [library message verb]?[ignore library line break][run paragraph on]”
– 46 “[blank command prompt][bold type]Which do you mean, [ignore library line break]”
– 57 “?[roman type][ignore library line break][run paragraph on]”
When play begins, now the command prompt is "[bold type]You decide to ".
Command prompt cold storage is some text that varies.
To say blank command prompt:
if command prompt cold storage is “”:
now command prompt cold storage is the command prompt;
now the command prompt is " ".
After reading a command when the command prompt cold storage is not “”:
now the command prompt is the command prompt cold storage;
now the command prompt cold storage is “”.
Every turn when the command prompt cold storage is not “”:
now the command prompt is the command prompt cold storage;
now the command prompt cold storage is “”.
Test me with “take the ball/red / examine yourself / drop the ball / take the ball/asdf / check yourself / take/red / drop it / take ball / both”.
The room description heading rule is not listed in any rulebook. [bold is for prompts; the room description informs the reader of the setting ][/code]
My purpose in bringing this up is this: though parsers cannot deliver on the promise that they understand whatever you type, merely changing the > minimalistic default prompt, after which nearly anything from HI MOM to WHAT’S UP to WHAT DID YOU SAY TO ME all seem equally likely to work, to a prompt which is either a direct question or an unfinished statement, gives a very strong indicator as to what is expected. This is especially true for the expected part of speech, such as the root form of a verb with or without nouns, or a single adjective like RED.
And that seems like a good way to help the parser keep its promises.