Been using Inform7 now for a week or so. What does anybody suggest for the best way to lay out the story as mine is all over the place. Is it best to name the room, the objects in room, interactions with said objects then the next room or do you list out all rooms then all objects / containers then interactions you use?
What method do people use of suggest?
Cheers.
Highly recommend some reading here:
There are all sorts of approaches, but the most helpful thing is probably to just check out done examples of how others have written their code and see what resonates with you. Here’s a link to games on IFDB that gave Inform 7 source code publicly available:
You might want to look at some smaller games rather than large ones just to get a clearer sense of more typical structures, but really, you can’t go wrong.
Hi Mike, clicked the link went to site but how do I get source code?
Click on a game, and there should be a link to the source code in the External Links section of its page.
Cheers Mate, All works well now.
People all organize their code differently. Inform 7 allows you to optionally divide code into Volumes
, Books
, Parts
, Chapters
, Sections
(much like books), which you can remember using Ryan Veeder’s mnemonic “very bad people choose sin”. This has the added benefit of creating a clickable table of contents in the IDE, although not everyone uses this. You can create a new divider like so:
[code]
Volume - Example
[code]
Note the empty lines above and below the title. You can also number these, such as Volume 1
.
You can also use comments with the square brackets [
and ]
outside of quotations (where they serve as variables). This can be used to comment out code, add documentation/author’s notes, note locations of bugs to fix or mechanics to add, or anything, really.
Almost everyone has some sort of “meta” section with hints, credits, etc. which are made using custom actions.
Many people divide everything (or many things) into extensions, making the story.ni
file mostly just a table of contents and sometimes a world model. Usually, these are done based on mechanic (e.g. an extension for all of the characters’ conversations).
Regarding the room/objects organization, it’s really personal preference based on how your game might be interacted with. For example, if items are intrinsically tied to the room that they’re in (so a book in a library, for instance), it might make more sense to have objects grouped with rooms. On the other hand, a sundry of usable weapons scattered throughout a house might be better off in their own section. Again, up to you.
With copy-paste, it’s fairly straightforward to reorganize your code as you please. Do what feels right and makes sense to you.