Squiffy 1.0

Squiffy is a lightweight tool for writing interactive fiction. It is open source and runs on Windows, OS X and Linux. It generates static HTML, CSS and JavaScript files which you can upload anywhere.

I’ve already written one interactive fiction system, Quest – so why create another? It was while writing my first game Moquette last year that I realised I needed a simpler tool for the kind of interactive story that I was interested in writing. I wanted something that would let me sit down and “just write”, mostly getting out of my way.

So I’ve now created the tool that I wished I had back then. This version 1.0 release is intentionally very simple – it’s a command-line Python script that reads in a text file, and writes the output to the same folder. Here’s how to install Squiffy.

Game text is written using Markdown. Players click links to interact with the game. Unlike other systems, Squiffy’s equivalent of “nodes” or “pages” are split into two types:

  • Sections which move the story forward
  • Passages which provide a way to further explore or interact with the same scene

An example might help to explain the distinction between the two.

You enter the room. There's a [chair] and a [table] here.
You can go to the [[kitchen]].

[chair]:
Just a chair.

[table]:
An ordinary table.

[[kitchen]]:
You enter the kitchen...

Here, “kitchen” is a new section, whereas “chair” and “table” are links in the same section. You can click the chair, and the chair’s description appears, but the table and kitchen links remain enabled. If you click the kitchen link, the table link is now disabled, as you’ve moved to the next section.

If this sounds confusing, don’t worry – you can build you game entirely out of sections, and it will play as a traditional multiple choice game. But by including passages, you could create works that have a bit more of an exploratory feel. If Moquette were written now using Squiffy, I could use sections for each train, and passages for interacting with people in the same train carriage, for example.

Squiffy also makes it easy to use JavaScript. Any section or passage can embed JavaScript, simply by indenting code before the text. This would be useful for Moquette-style transitions – here’s an example of a screen blackout between sections.

A player’s progress is saved automatically to the browser’s local storage. They can close their browser tab, and the game will be restored immediately when they come back.

You can save state in attributes, replace text, and make links that replace themselves.

For publishing your game, you can upload it to any web space, or submit it to textadventures.co.uk. You could install PhoneGap or upload it to PhoneGap Build to turn it into an app.

Instead of “big bang” releases, the plan is to improve Squiffy one feature at a time. We will build up to a web-based editor over a series of what will hopefully be relatively frequent releases. For the plan, see the Development Roadmap.

For full details on using Squiffy, see the documentation.

I hope you will give it a try and give me your feedback in the forums!

Advertisements

5 thoughts on “Squiffy 1.0

  1. Anssi Räisänen

    HI! This all sounds very good. Because of the sections/passages approach, it is possible to implement locations, and then passages take care of describing what happens in each location.
    Anyway, I couldn’t actually install the application so far. The instructions should really be more informative at the place: “At a command prompt, type “pip install markdown”.” At what command prompt? Surely not just any random one, which is what the instructions now imply. Where do I find this command prompt (I tried Start->All programs->Auxiliary programs->Command prompt, with no luck. Also I tried the Python command prompt, without any more luck.
    Just one more question: How would one go about allowing the player character to have an inventory? Through attributes probably? Would there be a way for the player to check the inventory at any turn (like a sticky link text in the marginal, or something)?
    Thanks,
    Anssi

    1. Alex Warren Post author

      It’s referring to the Windows Command Prompt. You don’t say what version of Windows you’re using, but if you type “Command Prompt” in the Start menu’s search box you will find it. However, if you’re not comfortable with basic usage of the Command Prompt, you’ll probably find it difficult to use Squiffy in its current form.

      Yes for an inventory you would implement that using attributes. You can use master sections and passages to check the inventory at every turn: http://docs.textadventures.co.uk/squiffy/master.html

  2. Pingback: Weekly Links #29 « No Time To Play

  3. rickcjlove

    Nice job!

    I just started looking into interactive fiction. I wanted to give my children a fun way to practice their reading and spelling.

    I have been looking at multiple editors and IF languages. I thought: “Why not just make it like markdown with a few variables?”

    Then, I found squiffy: Good work!

    I just wrote a short story using squiffy syntax. It’s nearly perfect. I could focus on the storytelling and the mechanics stayed out of the way. (Now I am downloading python so I can compile it and show it to my kids.)

    I am very interested in seeing the compiler run in pure javascript. I want to see every step work in an offline web app (that could be native compiled using PhoneGap of course).

    I am a software developer myself. I have been looking for interesting open source projects to work on where I could make a significant contribution.

    I have some ideas on the roadmap: I think a browser based solution should be before the node.js solution. With the limited feature set, it ought to be easy to get a pure js compiler running in the browser in a short time.

    I would be interested in starting an implementation in Typescript.

    1. Alex Warren Post author

      Thanks!

      Interesting idea about having a full implementation in client-side script. You wouldn’t be able to export files for uploading this way, but it would be a nice way of having a complete local development environment for Squiffy scripts, running entirely in a browser.

Comments are closed.