Inform is a programming language very different from the others I know.
It is designed to read like prose and is for specifying an environment to be interacted with through text. The interpreter’s output is something similar to old text games, such as Adventure.
A hello world example would be:
"The Bedroom" by Andrew Lee The bedroom is a room.
room is a built-in class of Inform and
The bedroom instantiates an instance of a room and gives it a name.
Once this minimal program is interpreted and running, there is also you, the player, inhabiting and interacting with the world.
I find this approach very confusing since the language places restrictions on different words based on the assumptions it makes about the world.
Confusion with Abstractions
I spent most of my time trying to make a working elevator.
I first made the elevator a
Room, but eventually learned that rooms cannot be rearranged because it is considered nonsensical. There is an example elevator in the documentation, but requires an east-west hack that I found unappealing. The resulting language felt very unnatural since it requires cardinality for entering and exiting the elevator.
I then tried making it with a
Vehicle and ran into another language issue. The interpreter was confused by
exit the elevator. The only command that resulted in the expected behavior was
exit. This is a common enough issue that there is an extension for solving this problem,
Modified Exit by Emily Short, which provides synonyms for the exit command.
I did finally get stuck on ending the story. I ran out of time looking for a conditional statement that would be triggered by entering the final room from the elevator. I assume I was simply unable to find the correct syntax, but also my attempts did not throw any errors from the interpreter.
- Make the lobby and the office floor spaces rhyme using stacked layouts
- Carry over the object oriented style into a world building tool using a pre-existing corpus