Organising the material in I7

Hi all and thanks to everyone who contributes to this forum. Until recently, I’d had no contact with interactive fiction since playing Level 9 games on the Atari 800XL in the 1980s. Finding it again, and discovering Inform is magical.

Anyway, in getting to grips with I7 I’m wondering about how to organise the various elements that come together to make a story. Is there a recognised optimum order for setting down, actions, defining rules, describing player information and object and so on. I think I’ve discovered that defining variables before recording details of the objects they relate to is better, but otherwise is there an order that makes the operation more efficient or helps with design.

I’ve had a look at a couple of published games where the author was generous enough to publish the source code (which was a revelation). If this is not a stupid noob question, any thoughts or guidance would be appreciated.

4 Likes

A few things have to be defined before being used, but mostly this is a matter of coming up with an organization that works for you.

1 Like

In this blog post, Ryan Veeder talks about organizing Inform 7 code (among other things).

2 Likes

The text Creating Interactive Fiction With Inform 7 by Aaron Reed provides excellent guidance on source code organization. Unfortunately it is out of print. You may be able to find used copies from various sources.

Every once and awhile it is available on the online big box store.

3 Likes

Just wanted to add that the example project’s structure and source code can be viewed online at Aaron Reed and Alexei Othenin-Girard - Sand-dancer (for Chapter 11) — 1 of 45.

This post by Juhana Leinonen also shows a way of organising I7 code: Structuring Inform 7 code | Undo Restart Restore

5 Likes

Thanks everyone. I’ll make a list :grinning: I’m really grateful for your help.

1 Like

Here are a couple of topics where people bounce source organisation ideas around:

Wade

3 Likes

Ryan Veeder’s mnemonic for remembering the structure is handy also: “Very Bad People Choose Satan.”

  • Volume
  • Book
  • Part
  • Chapter
  • Section
3 Likes

Thanks Wade. The first attempt was just a very short game to play with my Granddaughter which pretty much followed the narrative. I was too naïve even to understand that rules were not room specific. I’ve been through my next project and sorted things roughly into - out of game / mechanics (actions and rules) / People / places / objects. Feel like I’ve moved on massively with the help from this thread.

Thanks Hanon - yes I saw that. The insight from that post into Ryan’s mind was very enlightening!!!

As a Satanist, I find this mildly offensive. I would suggest instead: “Very Badass People Choose Satan.”

1 Like

I might also suggest “Very Bad People Choose Sauerkraut.”

1 Like

As a devout Lactobacillus worshipper…

(Okay, not really. But I’ll go for kimchi any time.)

2 Likes

Veeder’s was Very Bad People Choose Sin.

1 Like

I’m not sure that I am adding anything here that hasn’t already been said, but I tend to prefer to define all my created actions, synonyms for actions, rules for action responses (particularly rules that will apply throughout the piece), verbs, and kinds of things before the ‘When play begins’ rule or initial location. I put any rule that will apply throughout the piece in that area, putting anything applying to actions in alphabetical order. That way, when I make a change to any of them, I don’t have to hunt a specific rule or line down, I know where it is. Though the Search function does quite well, this way I can also actually scroll up or down and easily find what I need. And beneath each room description, I define each object, one by one, implementing it by going down the actions list in the IDE, deciding which actions will reasonably apply to it. That way I make sure that each object in the piece is as fully implemented as I can make it.

I think it’s really a matter of your preferences, how you organize your code. The compiler is just going to translate whatever you have into computer language, no matter how you slice it. As was suggested above, it’s really about what works best in your mind.

3 Likes

Whoops, my bad, sorry for getting it wrong. I always heard Dana Carvey’s Church Lady voice when I read it!

2 Likes