Spotted in Stefan Tilkov's Random Stuff
Howard
Lewis Ship points to Inform
and suggests using it as a first language. Looking at his program, I am once
more intrigued by this language — very neat.
Inform is a language and system for creating text adventure games -- or more accurately, interactive fiction (IF). It goes miles beyond the old tools that let you create rooms and objects, by letting you create new kinds of objects and rules about how they interact with the player and the world. As the Inform site explains:
In place of traditional computer programming, the design is built by writing natural English-language sentences:
- "Martha is a woman in the Vineyard."
- "The cask is either customs sealed, liable to tax or stolen goods."
- "The prevailing wind is a direction that varies."
- "A container is bursting if the total weight of things in it is greater than its breaking strain."
Inform's power lie in its ability to describe: to lay down general rules about "closed doors", or "bursting containers", or "unmarried men liked by Martha". At its best, expressing IF in natural language results in source text which is not only quick to write, but very often works first time, and is exceptionally readable.
Sound familiar? :-). With Inform, storytellers effectively create their own domain-specific language and semantics, and players of the games write statements in that language. The storytellers themselves are using a DSL, but one fixed by Inform -- just as metamodelers in MetaEdit+ Workbench use GOPPRR. While it's always an interesting choice between a textual DSL, a graphical DSM language, or a set of forms and tools, the key thing is the set of concepts used. It would be fun to see what a graphical version of Inform's language would look like. Certainly more impressive than this, which was just a quick demo I made with our DSM language for building Symbian C++ applications on mobile devices:
