Lines of Communication
version 1 by Aaron Reed
- Section: Setup
- Section: Communicating with File Channels
- Section: Background File Channels
- Section: Real-time File Channels
- Section: Debugging
- Section: Possible Future Improvements
- Example: * Smarter Smarter Parser - Send unrecognized commands to an external text parser.
- Example: * Background Hint Processing - Hint processing in the background while the player continues.
- Example: ** Man vs Robot - Imagining a chess match with both an external chess computer and a peanut gallery of online commenters.
This extension creates a manager for file i/o, designed to ease communication with one or more external programs running in parallel with an Inform story. External programs can send parseable commands to a Glulx story that are executed in the background when their associated file channel is switched on. For instance, you might have a fast external chess algorithm. With this extension you could send the player's moves to it:
inform the chess computer that "play queen's gamble"
...and receive back a parseable command like:
"PLAY KNIGHT'S ORANGUTAN"
Hooks make it easy to detect which commands are coming from external files, and change behaviors accordingly (in this case, for instance, redirecting the command to be tried by a non-player character in the story). Accepting parseable commands means authors don't need to write their own text-parsing routines to deal with incoming data.
Real-Time Delays by Erik Temple is required for this extension. Including Console by Aaron Reed provides optional debugging support.