Design theory for Inform 7

I have a general question about the best way to compose my interactive story. I have a few thousand words now, enough to slow down the playing of it. Is it better to make small independent extensions and sew them together, or have one long story without them? Does it make a difference?

Whether you use extensions or not doesn’t affect the speed of the game itself. It’s just a way for you to organize the source code, for your own benefit.

OK, thanks for that. I am a former programmer who is used to mixing and matching libraries for optimization.

1 Like

Yeah, there’s no dynamic linking in I7. For the most part, it’s as if the contents of each extension are inserted directly into your source before compilation.

The real benefit of extensions is code organization.

OK, that’s clear. It’s like having .h files in C program source (if you can recall that).
I assume the extensions can step on each other if they conflict, as a single thread list of code would do.

Absolutely. One of I7’s biggest weaknesses is its lack of namespacing—again, like C. When there’s an ambiguity Inform generally tries to default to the thing in the same section or the same extension, but it doesn’t always succeed.

On the plus side, unlike C, it handles things like including the same file multiple times or including files in the wrong order pretty well.