Sunday, September 22, 2013

The once forgotten Parchment for Inform 7

Three years ago Aaron Reed, Graham Nelson, David Kinder and myself hashed out a system for automatically generating personal copies of Parchment in Inform 7. By simply adding a single line to your code you would be given a website which you could upload to your website or stick on a USB drive, removing the need to tell someone to install an interpreter first. This is pretty common now, and all the major IF development systems now support some kind of web play, but at the time it was big progress.

For a while though Parchment for Inform lagged behind the standard version of Parchment because I needed to manually update it. Most of the time it was straight forward, but sometimes the changes in Parchment would need a little massaging to work for Inform. There was a sad time when the Inform version of Parchment wasn't updated for over a year.

But now, thanks to Grunt, the Inform package is built automatically. Whenever I update Parchment, the Inform package is updated too. Most people just use the version of Parchment included within Inform itself, but if you're the kind of person who loves to have the newest everything, you can now be assured that the current Parchment for Inform package is truly up to date!

Download it now at Parchment's Github page!

Sunday, April 7, 2013

Welcome and say hello to ifvms.js on npm

Welcome to the Parchment blog!

I enjoy reading technological articles about IF, so I thought there must be others who'd be interested in reading about the inner workings of Parchment. In the future I plan to write some explanations of how Parchment works: how the layers of virtual machines within virtual machines somehow manage to run games fast enough even on a simple phone, and how with the promise of future web technologies like asm.js I think it will even run faster than your favourite desktop interpreter! This will also be the place for Parchment news and announcements.

ifvms.js on npm

Inside Parchment are several virtual machines, but the one that is most commonly used is one I wrote myself, called ifvms.js. For now it is used only for Z-Machine stories, but eventually I will write a Glulx VM too. ifvms.js is written in JavaScript, but before now to build it you had to use Python. I decided it would be a little more straightforward to use JavaScript to build/compile it, and so I've switched to node.js and the excellent Grunt Task Runner. In addition to building it, Grunt uses JSHint to ensure my code is of a high quality, and it also runs the Praxix Z-Machine unit test. So hopefully the embarrassing moments when I fix a bug only to introduce a new one will be much less common, as these two tests will catch the problems before I push the code to! I will be adjusting Parchment itself to use Grunt in the near future, so that the one set of tools will be used everywhere.

It took a few small changes to get it to run in node.js, but once it had, I thought I might as well add it as a npm package. So I did! With one easy command you can now install a Z-Machine interpreter anywhere you can install node.js. I would love to one day discover that someone used it to create a chatbot, or maybe as part of a unique easter egg in some other JS project. Or maybe you have other ideas; whatever you have in mind, getting it is as easy as "npm install ifvms"!