William C. Wagoner
Taking the previous two room example based on Dante's Inferno, here is how to create the first room- where they player starts out. The following text would be written in the Inform compiler;
-
The Dark Wood is a room. "You awake from a deep sleep to find yourself lost in a Dark Wood. You cannot remember how you got here and have lost your way- the forest around you is dense, and you cannot see any discernible path."
The first room of the adventure has been created! The colors are as they appear in the Inform compiler. The actual computer code is black and tells the computer what to do, the description is in blue and is what the player will see. As you can see, the programming language is very natural. To make the second room, we would write the following below the first room, with the only addition being a directional relation;
-
The Base of the Hill is a room. It is north of the Dark Wood. "As you stumble blindly through the undergrowth, you come to the base of a rocky mountain, the top of which is bathed in the radiant light of the sun."
The directional relation (second sentence) tells the computer that if the player types GO NORTH when they are in the Dark Wood room, they will end up in the Base of the Hill, and vice versa. With these two simple paragraphs of computer code a (very short) playable game can be compiled and run.
A recommended resource for teaching students mini lessons in programming their IF adventure is Jim Aikin's Inform 7 Handbook. It was written for middle school students, and is free to download. Mini lessons can be derived directly from this handbook, and it can be found here: http://www.musicwords.net/if/i7hb.htm
One of the benefits of a game design such as IF is that it is iterative design. Students will need to constantly test, alter, and re-test their creation, which results in deeper learning. They should also be encouraged to post their final products online for others to play and comment on, and a digital school collection of all the adventures should be created for future students to use as models.