What it is

Jaiffa (Javascript Interactive Fiction/Adventures) is a toy library for the creation of text adventures that can be embedded in a Web page. It was created as a programming exercise and idea testbed. Jaiffa is small, fast, and easy to use, study or modify.

Jaiffa provides a DSL (Domain Specific Language) for the creation of text adventures, but the user interface needs to be implemented separately. The demo adventure comes with example code.

What it is not

Jaiffa is not meant for mainstream usage. If you want to write serious interactive fiction, I urge you to consider one of the mainstream authoring systems. Jaiffa is kept deliberately simplistic; any game made with it would be far from meeting the expectations of a modern player. Also, due to the syntax of Javascript, writing long messages is difficult.

What it is good for

That said, I'd be delighted if people found it useful. Some possibilities:

  • Maybe you want to know what a text adventure system looks like on the inside, and the big ones intimidate you.
  • Maybe you want a text adventure system in your language, and the big ones are too difficult to translate.
  • Maybe you just plain like retro-style text adventures. Jaiffa offers an experience not unlike Scott Adams' system, only without the hardware-imposed limitations.

What makes it special

Jaiffa borrows what I consider to be some good simplifying ideas from MU*s.

  • Doors can be locked, but not opened or closed. (Why? I'm yet to play a text adventure where it actually matters. So I did away with that.)
  • The containment model is simplistic: only rooms and actors can contain other objects. (And scope is pretty much always the same.)
  • There is no concept of a compass. Exits are arbitrary. (That makes implementation easier, besides, not everyone likes the compass metaphor.)
  • Rooms are lit by default. (The opposite makes sense from a simulation perspective, but not from a game design perspective.)
  • Objects and exits in a room are explicitly listed. No more guessing what is and isn't there, or relevant for that matter. It also allows using objects to "paint" a room, Scott Adams style.

Some additions of my own:

  • Objects are nailed down by default. That eliminates perhaps the most common type of bug.
  • The player's location is considered to be in scope. That allows commands such as 'clean kitchen' to be easily implemented.

Compatibility

Jaiffa works in Firefox 3.5, Opera 10, Arora 0.10 (Webkit-based), and partially in Konqueror 4 and Nokia Browser.

Limitations

Right now the parser is restricted to two-word commands. It's plenty enough to implement a complete, if primitive, adventure. But I'd like a future version to be smarter.

No save, load or undo yet. To restart, just reload the Web page.

No light sources either; for now, just flip the dark flag on rooms manually.

The library messages should be gathered in one place for easy translation.

To the game
Last modified: Wed 02 03 2011, 06:53:13 UTC