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.
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.
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.
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.