A Sequential Calendar with Inform 7

The Historical Williamsburg Living Narrative depends on having an internal calendar so that days and dates may be tracked, thereby driving the narrative forward with some measure of historical accuracy. The story begins on April 20th, 1775, and what happens in the early hours of April 21st are key to the story. While Inform 7 has some built-in functionality to deal with the time of day, I haven’t found any functionality around tracking the days that pass. Specifically, I want to be assured that the day and date change when the time crosses midnight.

To deal with this, I developed a little bit of code logic to handle the passage of time from one day to the next. One of the key things I discovered about Inform 7 is that its day marker is at 4:00 AM rather than at 12:00 AM. Once that is understood, writing the code depends on a three-way conditional rather than a two-way version. The following code can be modified for your specific needs:

calendarcolde

The code is generic, so you can alter to adjust for your needs. I’m using a version that’s only very slightly modified to meet my game needs.

If anyone has a more elegant solution (or knows of an existing Inform 7 command that might help), please drop me a line!

EDIT: I’m using time spans rather than a specific time (11:59 PM) to check the state because the player character may be asleep from before 11:59 PM to well after.

 

Latest Playable Release – HWLN13

The latest version is up for Backers to download. The new map includes the layout of the Governor’s Palace from the cellar to the third floor.

Latest Playable Release – HWLN12

This report recently went out to all of the game Backers on Kickstarter. The actual download location is available only to the Backers.

**********

Greetings, Backers!

I new version is available for download at [URL HIDDEN]. Included in the .zip archive is a map of the locations.

A quick word about the map: where you see the location names highlighted in blue, the blue portions indicate a shortcut in the game navigation system (meant for speedier play testing only). For example, on the map is the “Military Encampment” location with the word “Military” in blue. When you are playing the game, type “xmilitary” at the cursor and you will be immediately taken to the Military Encampment. This will work for any of the locations in blue.

A big “thank you” goes to backer Vivianne D. for her work on the navigation code in Inform 7. Now when you type “dir” at the cursor, the game will display all possible directions (unless specifically hidden) based on room relative location definitions. Previously, I had been hand coding all those directions.

Otherwise, changes in this version are not major. Cleaned up more descriptions, added some detail, etc. Feel free to play it and let me know what you find.

In an upcoming release I will be publishing a guide that provides a listing of the possible commands.

Hap

Revised Game Map

I’ve revised the game map slightly from the last published version. In this new map, there are some altered and additional paths between locations. Also, several of the buildings (represented by red squares) have interior rooms, providing more locations for exploration. These buildings are marked with the light blue circle around them. This map is being implemented in version 11 or the test program. I’ll have that version published soon for the HWLN Kickstarter backers.

 

Williamsburg Game Map 07

Doors, Doors, Everywhere!

An interesting note about dealing with doors in Inform 7. I’m having to come up with unique names to identify the individual rooms/locations in the game. While it’s possible for me to use designations like “location001,” “location002,” etc. and then assign display names with the “printed name” command, that’s not as useful to me from an ease-of-review programming methodology. So I’m having to come up with some fairly lengthy yet nicely descriptive names.

All this makes me realize how many doors I have in the game. The Governor’s Palace alone is four stories (including a basement), and it has a whole lot of bedchambers that need unique names, for example.

But at least the players will be able to open and close doors in the game–at least those that aren’t locked. Or hidden.

Interested in getting started with Interactive Fiction?

If so, this primer by Andrew Plotkin will give you an introduction. The handy-dandy reference card is especially helpful.

http://eblong.com/zarf/if.html

Latest Playable Version

A quick update: there is a new playable version of the game available for backers of the original Kickstarter project. Here’s what I shared in a message to the backers (removing the access instructions for the actual game).

This version includes some minor navigation/map description updates. The main change here is in the addition of some non-player characters (NPCs).

The NPCs are implement in a very basic capacity, and they are not in their final game locations. Dialog is limited, but you can test them out using the “ask [character] about [noun]” format. You will find:

  • a farmer – in the Palace Green. You can use the command “ask the farmer about Anderson’s” when you encounter him to see what happens.
  • a cordwainer – ask him about shoes when you find him.
  • George Wythe (no dialog)
  • Thomas Jefferson
  • Patrick Henry

For Jefferson, Henry, and the farmer, there is additional dialog, but I won’t say here. It’s not likely you’ll be able to guess what to ask them about (though if you know Williamsburg histry you may be able to figure it out). Don’t worry about that, as the context of the game events will give you clues/hints.

In the meantime, if you do playtest (or even if you don’t), feel free to let me know what kinds of things (nouns) you might ask about and expect to get some sort of answer. Your feedback will give me good player’s perspective.

More NPCs will be added, along with greater dialog vocabulary. Other considerations will be making dialog dependent on time of day, location, and even what the player may have learned from other characters or in discovering certain things about the environment. NPCs will not be “stuck” in the same location, and the time of day will determine where they are.