Dynamic Conjugation

by Gamefic on Apr 28, 2016

The original version of the standard library was hardcoded to use the second person when referring to the player's character, e.g., "You go north." Not anymore. Scripts can access an object that defines grammar rules for the PC through the you method. Read more

Haul and Pull

by Gamefic on Apr 18, 2016

The Gamefic project went through a major overhaul this weekend. Most of these changes have been in development for months. Saturday I started merging them into the master branch on the GitHub repo. Read more

Another Weekend, Another Refactoring

by Gamefic on Jun 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: Read more

Reevaluating the DSL

by Gamefic on Jun 21, 2015

This weekend I pushed a new repo branch that includes a major refactoring of the plot DSL. The syntax for plot scripts is largely unchanged, but the new code behind it uses a new module called the Stage. I based it on the Clean Room pattern described in Metaprogramming Ruby and further developed by Seth Vargo. Including the Stage module can make any class capable of loading code from a Ruby DSL. Read more

Managing and Customizing Scenes

by Gamefic on Jun 1, 2015

The concept of scenes has always existed in Gamefic. The simplest kind of scene was simply a block of code that got called by the cue method. There were also specialized kinds of scenes like pause, prompt, and yes_or_no. The system seemed solid in my initial tests, but when I started building a larger game that heavily relied on different types of scenes, I noticed a few shortcomings. As a result, I redesigned scenes so the shortcuts for creating common scene types were still available in plots, but under the hood there's a system that provides a lot more capability. The new system is based on three classes: SceneManager, SceneData, and the Scene itself. Read more

First Prototype of the Gamefic IDE

by Gamefic on Dec 21, 2014

The Eclipse plugin for Gamefic is finally a functional proof of concept. Basic features like creating projects and editing files work. Syntax highlighting is partially implemented. Embedded JRuby libraries allow for realtime code analysis and debugging on the fly. Read more

Using a Dictionary Database to Build a Smarter Parser

by Gamefic on Dec 10, 2014

One major challenge in parser-based adventure games is avoiding guess-the-word problems. Players can get frustrated when they attempt to push, activate, or turn on a button, only to discover that the game expected them to press it. Developers typically have to rely on extensive testing and their own meticulousness to make the parser as comprehensive as possible. Right now I'm experimenting with a more automated solution: querying a dictionary database for synonyms of implemented verbs. The game can use this data to make sensible recommendations for unrecognized commands. Read more

More Accurate Entity Detection with Recursive Queries

by Gamefic on Nov 25, 2014

The Query::match method is pretty good at uniquely identifying entities when all the possibilities have unique names. If two items have the same name, however, unique matches are impossible. Right now I'm experimenting with a solution that solves the most common instance: portals named for compass directions. Read more