top expert

i am my own ghost

Let’s Make IF #1: Marbles, D, and the Sinister Spotlight.

Let’s Write a Story, Together

Hello, authors! This is a development diary for a short work of interactive fiction. I will be writing it in Inform 7, a text parsing platform. My plan is to document most of the process, from the first line of code to the final release candidate.

I’m writing a game called Marbles, D, and the Sinister Spotlight. This will be a narrative-driven work with a few problems that players can (hopefully) solve intuitively. The protagonist, a cat named Marbles, will work with her human friend to identify and assist a mysterious creature. This is a story appropriate for all ages, though players familiar with the character of D from Repeat the Ending may have more complicated feelings. As indicated elsewhere, this is the first story in the extended Repeat the Ending universe, but it is meant to be light-hearted and wholesome rather than dark.

Who am I? I have written one Inform 7 game that has received some positive reviews. I also write about classic interactive fiction games from the 1980s. I do not have a programming background.

Speaking of which, here are my guiding principles for IF authorship. You don’t need to agree, but these will help you understand how and why I make the design decisions I do.

Drew’s Rules to Live By

  • Inform 7 is for everyone.
  • I evaluate my own code according to two criteria: utility and readability.
  • Code is for sharing, and the best shared code is broadly comprehensible.
  • Taking the long way around is a worthwhile price to pay for accessible/readable code.
  • Mimesis is overrated, but problem solving really ought to be author-motivated.
  • A game is only late until it ships, but it’s bad forever. –Siobhan Beeman (Origin Systems) 1996.
  • There is value in work that has more passion and commitment than it does technical polish.

More as they occur to me!

Getting Started: Volume One

Let’s start our project! This will be written in Inform 10.1.2. I’ll post borogove snippets with sample code whenever possible. Here’s how all of my projects begin:

the story title is "Marbles, D, and the Sinister Spotlight".
the story author is "Drew 'Drew Cook' Cook".
the story headline is "A New Adventure in the RTEverse".

release number is 0.

Volume 1 - preamble

Note the Volume designation. This is Inform’s built-in organizational hierarchy. It’s easier to organize your project early rather than shuffle everything around later. Give it some thought now as things begin.

  • Volume
  • Book
  • Part
  • Chapter
  • Section

Next, I include extensions. There will be more, but for now I’ll add only one:

include Basic Screen Effects by Emily Short.

I use Volume 1 for very high-level statements that delineate what the story is and possibly deal with infrastructure-type issues. It’s a very short volume compared to the others. After designating the title and author, I set up a condition that my rules can use to determine whether or not they apply to test or public releases.

PROD is a truth state that varies.
PROD is usually true.

Book 00000 - not for release

PROD is false.

I can use a condition or description to let rules apply only in test. For instance, skipping “press any key” prompts might be desirable while working in the IDE. I could do something like this:

carry out performing an interesting action:
	say "Wow, that was really interesting!

Press any key to continue.";
	if PROD is true:
		wait for any key;
	continue the action.

Using this tactic, you will not have to press the space bar repeatedly across multiple compiles and tests.

Some other things might wind up here later, but let’s move on for now.

Volume 2: Data and Texts

The next thing to take on are common text substitutions. Since I use them everywhere, they need to be in place. I use a lot of emdashes (long hyphen) in my writing, but there’s no emdash key in Windows. Applications add them contextually. MS Office–and other applications, including this WordPress editor–will automatically substitute two hyphens for an emdash when they appear between two supported characters. In Inform 7, the solution is substituting the unicode value of the symbol. Since the unicode decimal for an emdash is 8212, inserting an em dash into an Inform 7 project looks like this:

[unicode 8212]

That’s pretty clunky! So my games are filled with shortcuts,

To say em:
	say "[unicode 8212]".

In practice, something like

say "em dash>[em]<em dash";

prints like this:

em dash>—<em dash

I have a bunch of these to cover staples like line breaks, periods that don’t break lines, and so forth. If I find myself typing something repeatedly, I’ll make a new substitution.

In Book 1, Part 2, I’ll customize Inform 7’s default responses and parser errors, but I’ll save that until we have a better sense of narrative voice.

Book 2, Volume 2 will contain values, especially ones that apply to the entire game. We don’t have any of those yet, though.

Finally, Book 3 will contain tables. We don’t have any of those yet either, but we will soon enough.

Volume 3: Machinery

Volume 3 contains rules, custom actions, and action customizations that pertain to the game generally. While I will define custom actions here, I will describe geographically specific rules elsewhere. Finally: I’m using relations for the first time in this project. Volume 3 will contain those, too, since my custom actions and rules will use them.

Volume 4: The Game World

This will be the largest and most complex portion of the game, since it will describe both the geography of the world and also the things that occupy it. It will also handle “local” actions. Likely organization:

  • Book 1: Regions and other world information
  • Book 2: When play begins
  • Book 3: Region 1
    • Part 1: General
    • Part 1: Room 1
      • Chapter 1: Room description
      • Chapter 2: Things
      • Chapter 3: Actions
    • Part 2: Room 2

etc…

Volume 5: Accessibility and Help

I will use Wade Clarke’s “Menus” and “Basic Help Menu” extensions to provide documentation and incremental hints. I will also store all information needed for a “Story Mode” walkthrough here.

If I can get some good art, I’ll add another Volume for it.

The Plan

I’m linking an Inform 7 Borogove snippet of the project so far. It doesn’t contain much of anything, but if you’ve never planned a large Inform 7 project, it might be useful to you. You can see how things are organized. Don’t necessarily do what I do! Use this as a prompt to think about how you would like to organize your project. The goal is not for you to find my way, but for you to find your own.

I’ll try to keep code available as I go. I’m planning to enter this game as a Spring Thing Back Garden entry. That means it won’t be part of the competition, which gives me a lot of freedom to share code and talk about the game.

I’d like to update this frequently; we’ll see how it goes. I’ll look at some custom actions next time and probably do a relation–that might be new for a lot of beginners. It’s new for me, too!

Click here to view today’s updates in an executable code snippet.