Adventure Games and Interactive Fiction

Another Weekend, Another Refactoring

by Gamefic on June 28, 2015

The Director class that handles actions just went through a major overhaul. Most of the changes are internal, so the impact on plot scripts should be minimal. Among the changes:

  • The Director's functionality is broken into several components for improved readability. I also removed a lot of cruft that made it unnecessarily complex.
  • The Delegate, in particular, is much smaller and simpler now.
  • The passthru method has been deprecated in favor of Character#proceed. It behaves the same but is much less fragile.
  • Disambiguation and unrecognized command actions are meta. Among other things, this means they don't require assertion rules to execute.
  • Several classes have been refactored to use autoload in order to improve the code structure. This feature was temporarily available on the master branch, but I reverted back due to issues with Opal. It works correctly in Opal 0.7.2.
  • More specs. My local checkout has 91 examples, including a suite of standard import tests.

Most of the updates are still on a separate branch while I troubleshoot a few more features. With any luck, I'll have it stable just in time for IFComp.