[Inform 7] Complex interaction, events, and rulebooks
Suppose that your game involves people that can be sleeping or awake; and a huge gong, that, when struck, wakes up everyone in the room and all adjacent rooms. This is the most natural way to implement something like that in Inform 7: Carry out hitting the huge gong: say "You hit the huge gong!"; repeat with guy running through near people: now guy is awake. Where I am, of course, assuming that you have already created a definition for "near", and so on. This is fine if your game is simple enough that (a) waking people is the only effect of hitting the huge gong, and (b) hitting the huge gong is the only cause of waking all near people. But if you are aiming for a complex world model, this will often not be the case; and even more often, you will not be certain whether it is going to be the case. Why is this a problem? Because you do not want your code to look like this: Carry out hitting the huge gong: ...