Changes in Gamefic 2.0
by Gamefic on October 25, 2017
Version 2.0 of Gamefic has been in development for several months. I think it's very close to being ready for release; in fact, I used it to make Redstone, my entry in this year's Interactive Fiction Competition. Here's a summary of the changes and new features.
- Better subplots. Characters can now engage in multiple subplots at a time. Plots are more capable of inspecting the states of their active subplots.
- Plugins. One of the challenges I've been facing is how to make scripts easy to share and distribute, somewhat like Inform 7's extensions. The new SDK will make it possible to build a Gamefic plugin as a gem.
- Scene tracking. If authors wanted to know whether a scene has been played or not, it used to be they had to track it themselves, e.g., by setting a property on a character. Scenes are now capable of automatically tracking which characters have entered them.
- Lighter core gem. A lot of cruft has been eliminated from the gamefic gem to make it more convenient as a pluggable component for game engines. Version 2 has zero nondevelopment gem dependencies.
- Extensible game state data. Previous Gamefic engines were limited in how they could share game data with clients. Version 2 uses state objects that can be extended with custom properties. This is especially useful for games that need to integrate with specialized user interfaces.
- Consolidated executables. The gfk executable is being eliminated. All of the CLI commands will be available from the gamefic executable.
- More web features. The ability to make web-based games has always been an important component of Gamefic. Version 2 includes several improvements to the Web platform. The Javascript engine has a cleaner and more powerful interface. The SDK provides a server that makes it easier to attach a Ruby debugger.
- Modular standard library. The standard script library has been broken into smaller parts, making it easier for authors to cherry-pick features.
- Taggable scripts. Scripts can now include comments that the SDK can use to document available script libraries. Authors can use the gamefic script command to learn what scripts are currently available for inclusion in their games. All of the major endpoints in the standard library are tagged.
Features still in development:
- Standalone command-line games. To run a game in a terminal window, Gamefic currently requires the game to be compiled into a .gfic file and opened with the gamefic executable. The new SDK should be capable of compiling games into standalone files, capable of running on any computer with Ruby installed.
- VS Code extension. The current SDK already integrates nicely with VS Code. The coming Gamefic extension should make it even easier to use features like intellisense, debugging, and automated builds.
- Online IDE. This is already in beta. It works as a proof of concept, but is of limited use for real authoring. I hope to make some major improvements to it after the version 2 release.