PX/IF, short for Perl/XML based interpreter for Interaction Fiction (or something like that), is an engine to write and play text adventure games.

Although it is technically possible, I don't recommend using it to write any actual games! Do yourself a favour and use Inform or TADS for that. They are both much, much more advanced than this system. PX/IF is provided for historical and technical interest.

PX/IF was developed in 2001 (some editorial fixes occured in 2009 for the sake of making the package 'releasable') when I was planning to make a certain game. The point was to have an interpreter which allowed the game to be played online. Even as of 2011, this would still be a distinguishing factor: Although Parchment and Quixe claim the same for Z-Code and Glulx games respectively, what they technically offer is playing these games in a web browser, but interpreted locally. Meaning the games are downloaded to your computer and run there. PX/IF, on the other hand, being based on Perl could be run truly server-side.

So much for the general idea. In the end, I simply wrote my game in TADS and gave up on PX/IF. So the part enabling games to be played online was never finished. Nevertheless, PX/IF does allow games to be written and played. One I/O module for the terminal works just fine; extending the system with a CGI-based module would be fairly simple as well: just take one of the many readily available HTTP session modules of Perl and use regular HTML forms for input. Problem solved.

Again, while I believe this system is not really worthwhile to write games in, I'm providing it in the hope that it might be of technical interest for someone to see some basic techniques of text parsing and algorithms of generic game logic. While none of these elements may be as flexible and powerful as those in Inform or TADS, they are quite on par with some of the intermediate engines out there. Commands like...

take all then unlock the black door with the shiny brass key

...are understood just fine. Another feature I like is that the source code of games does not grow into one large monolithic file; each location or object (the latter includes characters) is defined in its own file. This makes the source code quite modular. Obviously, as the interpreter is written in pure Perl, games could be run on virtually any system. Now that I'm writing this, I notice the system may not be that bad after all ;)


Version 1.0

This includes the full source code of the engine (provided under the 2-clause BSD licence), some rudimentary documentation and a port of the Cloak of Darkness demo game (originally by Roger Firth).

Back to YLLR