Fiction is a Three-Edged Sword

Fiction, interactive fiction and narrative

House-sized stories for Kindle

11 Comments

A few weeks ago I posted up a nasty little perl script called the Kindliser, which turns a plain-text markup into ebook-ready HTML. Not such a big deal – it’s just a web-page with links – except that it also included support for tracking true/false values, which is impossible.

It does it by playing through every possible game the player might have, and writing them all out separately… which turned my first example game Flaws from a 40Kb sourcefile with 40 paragraphs of so and 4 true/false flags into a 600Kb HTML.

The other day I thought; I wonder how far I can push this thing?

So I started writing a murder-mystery. With clues, and evidence, collected up in a notebook. And a branching order of investigation. It’s 163kB of source – 200 paragraphs, and 70 true/false variables. And I ran it…

Wikipedia as a book

Imagine this, 15 times over

…and my computer made a very funny noise indeed…

…and the battery meter went from “4:20” to “23mins”…

…and out came a 40Mb HTML file containing 65,000 paragraphs.

The game is called A Job For Life, the interview mechanic is a streamlined, improved version of how I think LA Noire should have been, and it’s got some exploration and a even an action set-piece. It’s a purely choice-based game, with no (visible) stats or randomness or dice-rolls.

If it was published as a book, it would be the height of a house.

And I was assuming that was that, and the only way I could distribute it was to send people memory sticks like I was in MI5, when I discovered that ebook compiler software uses compression. In fact, it has a compression switch designed for dictionaries and encyclopaedias. It has a quite good compression, which got the file down to a slim-line 4Mb. Which the Kindle itself can handle, without any lag or issues. (The game’s HTML file is so big that it crashes most browsers, but not the Kindle).

In fact, the reader would never know, until they try to use the “go to” feature which tells you how many pages there are.

The game’s in testing at the moment, a process which is made worse by the way trying to compile the game takes quite a long time, as it has to play out every possible path through the text. But I hope to release it soon: with an online demo of the first chapter, and the rest available from Amazon. Wifi recommended.

Advertisements

Author: joningold

Jon Ingold is a writer and games designer from Cambridge, UK. He is co-founder of inkle, a company specialising in interactive narrative for mobile devices. He has written prose, plays, short films as well as interactive fiction, both in hypertext and parser-based systems. His short stories have appeared in Interzone magazine and his IF works have won competitions and awards.

11 thoughts on “House-sized stories for Kindle

  1. Pingback: Infovore » Links for October 7th

  2. While I appreciate the awesomeness of doing this as an ordinary ebook, I’d be happy to publish your book using the Kindle KDK, which is a much better fit for a project like this.

    • Hmm. That’s quite a tempting offer. I’ll have to think about it. 😉
      I’m a little anti KDK just because of the whole not-in-the-UK thing… But being able to do things with a nice UI would be good. (Currently, the worst thing about linked ebooks on a Kindle is if you press – something, and I don’t know what – it goes into highlighter mode, and you have to faff around to get it to go back into straight link-following).

  3. Cool!

    For testing, depending on how complex your state is, it seems like this approach should be fantastic for automated testing. Add some extra flags to track when the player sees particular sentences, sprinkle the whole thing generously with assertions about what you should and shouldn’t have done previously, and check that all assertions pass in all possible walkthroughs? (And when your manual testers find problems, fold those into new assertions.)

    • Well, almost: it is a little bit optimised, in that if it comes across a paragraph that’s a logical duplicate of another – same state-variables – then it doesn’t write it out again. So it’s still possible to link things up when they shouldn’t link up. But it’s not bad, and I’ve been doing a little bit of this kind of testing already.
      (For instance, if the play-through finds a paragraph with options, but where all the options are discounted because of state-data, it prints out a full history of the play-through that reached this point because it’s unlikely to be correct. That’s been unbelievably helpful so far in catching edge cases.)

  4. Pingback: Nothing About Potatoes | Things I found on the internet. Cannot guarantee 100% potato-free.

  5. I’m looking forward to trying this out on my Kindle! Static HTML with states, what a cool idea. It’s such a shame that Amazon decided that ebooks are to be dumb and cannot have any intelligence at all, apart from their carefully crafted linear stories, of course!
    A word about the (lack of) KDK here in Europe…. Be careful about going the active content route as Amazon don’t seem to want to publish ANY active content for Kindle outside the USA, and I don’t really know why. It’s simply not available outside the USA and that’s that. (I believe Americans would say period here)
    —Rant Start
    What are they afraid of? The Kindle source code is published, the hackers and tweakers already gave the community some quick and harmless hacks. Why can’t anyone build some active content AND download the KDK it if they want. I can’t see any real active content downloads in the Kindle Store apart from reading the tantalising descriptions and seeing the ‘Not available in Europe’ disclaimers. I guess I could change my address to one in the USA (it seems I need to provide a street address including a phone number), but as I live in Germany it isn’t that easy! In any case, I want to read, and play with, books on my Kindle, so I would still like to buy things from Amazon and not be black-listed in any way.
    Now that the android-app capable Fire has been released, I’m guessing that the KDK will slowly die off, even before being released from the limited beta testing – which appears to be in the same closed, not a lot happening, state for a few years now.
    No javascript in ebooks. – Yes ok, not really a problem.
    No javascript in pdfs. – It might have been interesting to see dyanmic things in Kindle pdf files.
    At least the webkit browser on the Kindle 3/Keyboard is half-decent and runs parchment/quixe quite well. (But you can’t load local content direct from the Kindle file system, you need to be online to download the game in the first place….)
    —Rant Over

    Still looking forward to using the Kindliser for a few experiments, but I’d better not print the books out, eh?! 😉

    • Thanks for the comment!

      “A Job For Life” is done: I’m just waiting for the right moment to dot the i’s, cross the t’s, and release the damn thing. But I’ll post up here when it’s done.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s