Inform 6 Ruby Port

License

The Inform 6 Library Ruby Port is a faithful port of the Inform 6 interactive fiction standard library to Ruby.

The Inform 6 Library Ruby Port includes the natural language parser library, the verb subroutine library, and the standard grammar definitions.

The reimplementation in Ruby is intended to be as faithful as possible to the Inform 6 interactive fiction standard library, maintained by David Griffith

However, the current version of the ported library has been based on Release 6/11 (serial number 040227) or Release 6/11N (serial number 060709) of the original Inform Library, which are obviously very far behind David Griffith's Release 6.12.2-pre (serial number 160608).

Requirements

It is necessary to use the companion runtime for a program which is written to use the Ruby Inform 6 Library. This arrangement and dependence on a second piece of software is required for two reasons.

First, it was explicitly requested of me by the author of the original Inform 6 Library, Graham Nelson, that the license used for the ruby port would be compatible with the original Inform 6 releases, specifically the Artistic License.

Second, it is the primary goal of this software project to represent as closely as possible the original source code. But of course, the original source code required the Inform 6 compiler, which converted the source code into byte code to be executed portably by an interpreter program compiled for a user's specific system. A program running in the Ruby interpreter runtime will not require such a compiler, simply a runtime apparatus. However, in order to maintain a close resemblance to the original Inform 6 Library, it is decided to make the runtime component of this Ruby Inform 6 development framework remain a project independent from the ported library.

To use the Inform 6 Library Ruby Port, one must install the Inform Runtime program that supports running a game written using the Inform 6 Library.

This component is packaged and distributed as its own separate stand-alone gem. So to get up and running as quickly as possible, you may obtain the inform-runtime software the same way one might install any other ruby gem.

gem install inform-runtime

Run

Execute the inform.rb program. It will play the example game included with the runtime software.

bundle exec inform.rb
Welcome to...

EXAMPLE
An Interactive Example
Copyright (c) 2025 by Nels N. Nelson.
Release 1 / Serial number 251006 / inform.rb v1.0.3 Library 6/11N 

Field
You are standing in a field in front of a small 19th century house which stands just to the east of you. The house hardly stands up to the stiff wind rolling down from the north.
You can see a small toy top here.

>quit
Are you sure you want to quit? yes
[Hit enter to exit.]

Linting

bundle exec rubocop

Project file tree

Here is a bird's-eye view of the project layout.

# date && tree -A -I "game|logs|vendor|tmp|Gemfile.lock"
Fri Dec  2 23:33:40 CST 2022
.
├── Gemfile
├── LICENSE
├── README.md
├── Rakefile
├── inform6.gemspec
├── lib
│   └── inform
│       ├── English.h.rb
│       ├── Grammar.h.inf.rb
│       ├── Parser.h.rb
│       ├── VerbLib.h.rb
│       ├── infix.h.inf.rb
│       ├── infix.h.rb
│       ├── linklpa.h.rb
│       ├── linklv.h.rb
│       ├── parserm.h.rb
│       └── verblibm.h.rb
└── roller2.jpg

Thanks go to:

Graham Nelson, David Griffith, Andrew Plotkin, Kevin Bailey