Sharpee: Process an IF turn entirely Without Text

As I develop Sharpee, one design decision has clarified significantly.

During the processing of a turn, the system won't generate or "print" any text. None.

But wait Dave! This IS an interactive (text) fiction authoring thing you're building, right?

Yes, but is streaming print statements the best way to emit templated text?

In some cases that might be optimal, and I certainly understand that writers might see it that way, but is it the best way overall?

I don't think so.

During the execution of a "turn", this is what Sharpee will do...

  1. parse player's command into a well-known structure that identifies the action, the adjective+noun(s), articles, and prepositions.
  2. validate the command and its components with the grammar and world model, including if all the necessary bits are "in scope"
  3. execute the associated function with the given action (take/drop/throw, etc) which will update the world model which automatically fires events into an event source (a data store similar to a log but for IF events)
  4. when the turn is complete and all actions have completed, the game loop calls a text service
  5. the text service will query the event source and the world model for both changes and current state and from that information, create the text to emit to the client. All the formatting, combining, listing, and templating of the text is handled in this text service.
  6. The text service is likely to be a host to multiple templates (console, web, API) but at first it will just emit standard IF to the console (stdio).

This will completely eliminate the need to "manage" spaces, newlines, punctuation, quotations. types (bold/underline), colors, and other text-specific logic until the text service does its work.

The author will initially only care about execution of the story.

Now, we may be able to add things like emotions or surprises as properties of an action and the template can properly emit bold or caps text, but that's going to be a contextual thing, not a technical thing. The author might tag an action as "important", but the meaning (in terms of text emission) of that is not determined until the text service is building its template of output. It could mean bold or a color or caps or whatever the template is designed to emit for that property.

I'm actually excited to write an IF game in this system. I want to see where it all leads.

Subscribe to My So Called Interactive Fiction Life

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe