I wish I was a real programmer. There’s a project I’d like to tackle, but it would take me years and drive me bonkers.

I can handle basic programming concepts well enough to write interactive fiction, but my games use one or another sophisticated library and compiler developed by a real programmer, and when finished they run on an interpreter program that was, again, written by a real programmer. The interpreter is what communicates with the computer’s operating system. I’m doing the easy stuff; the interpreter does the hard stuff.

Tonight I was looking around the Web at the state of interpreters for various platforms. It’s, you guessed it, a maze of twisty little passages, all different. For starters, there’s Twisty, a Z-machine for the Android. Judging by the list of bugs on the SourceForge page, Twisty seems to be languishing. And in any case, it’s a Z-machine.

The Z-machine is obsolete. It ought to be a dead issue. I don’t know why anyone thinks it’s still viable to write a Z-machine. Glulx is quite limited in some ways, but it has some serious advantages over the Z-machine. For starters, the ability to play large games, of which there is now a very considerable number.

There’s also Frotz, a Z-machine for the iPhone. From what I’ve heard, it’s fully functional, but see previous paragraph.

TextFyre makes FyreVM available, and it looks to have some nice features, but it isn’t even an interpreter. It’s a toolkit with which you can build an interpreter, if you’re a real programmer.

I’m not 100% convinced of the desirability of playing IF on a phone, because it involves typing with your thumbs. I guess people get good at that, but it can’t be fun. Also, the screen is too small to show much text. But it would be nice to think of the millions of smart-phone users as a potential market (as in, paying market, but even a large non-paying fan base would be good) for IF. At this point we’re nowhere near that.

Rumor has it that someone or other is about to start developing an interpreter for the Kindle. (This is not just a rumor, either. It’s solid. Out of respect for the muzzle placed on this particular individual by Amazon’s corporate lawyers, I will say no more.) Kindle: Bigger screen, good. But the Kindle interpreter, if it gets off the ground, will be a closed system, and the developer is talking about possibly charging authors to make their games available through this system. In the music industry, we call this “pay for play,” and it’s not something I would be happy to participate in. I hope the developer will think better of this idea; nothing is settled yet. But that’s the point: nothing is settled yet. We don’t know for sure that this Kindle project will get off the ground. If it does get off the ground, it will be of no benefit to anyone who doesn’t own a Kindle. And apparently Amazon is picky about who they release the Kindle Developer Kit to, so there’s not likely to be a rush by IF interpreter developers to exploit that device. (Apple is also rather rude to iOS developers, I believe.)

On another channel, there’s a fascinating development for smart-phones that I can’t talk about because I’ve signed a non-disclosure agreement. It could be very cool indeed … except that the person who is spearheading it has a day job. As far as I can see, not much development work is going on there either.

The other night, after hearing that an interpreter called Nitfol can auto-map a game, I tried to download and install it on my Windows 7 machine. No dice. It needs some system-level tools that are not provided by the installer program, so it wouldn’t run. Oh, well. I don’t need auto-mapping, I just thought it would be a cool thing to recommend to people if it worked.

And can we talk about the iPad? Frotz works there as well, I believe. But I’ve learned that the current OS won’t multi-task. For IF, this is a smack in the face, because you can’t keep a notepad program open on the side to take notes while you play a game. Nor can you keep a graphics program open to draw a map while exploring the terrain of the game. So you’ve got this sexy little hand-held device, but if you want to play IF on it, you also need a pencil and paper. Zowie.

And of course none of this has any relevance if you’re writing games, or would prefer to, in TADS 3. It’s all Inform stuff. I like Inform 6, so I’m not complaining, exactly (though I like T3 too). All I’m saying is, the absence of T3 developments is another twisty little passage that seems not to be leading anywhere.

If I were a real programmer, I think I’d probably sit down and create a good Inform/TADS interpreter for the Android OS. I’d attempt to build it in such a way that it could easily be ported to iOS. But alas, I’m not a real programmer.

In any case, we seem to be moving back toward the multi-OS paradigm of personal computing that was the norm in the early ’80s. Osborne, Kaypro, Commodore-64, Atari, Apple IIe … feh. Today we have MacOS, Windows, Kindle, iPad, Android, and probably five or six other things that I haven’t heard of yet. This was why the Z-machine was developed, of course — so that a game could run reliably on the virtual machine, no matter what actual computer the user had. But today the challenges in developing a truly one-size-fits-all cross-platform interpreter would be, I’m sure, at least ten times greater. Maybe 20 times greater. So we all blunder around blindly and bump into things. Feh.

This entry was posted in Interactive Fiction, technology, writing and tagged . Bookmark the permalink.

14 Responses to Twisty

  1. georgek says:

    I won’t dispute the main point of this post, but I think the value of browser-based interpreters shouldn’t be overlooked. Granted, at the moment there isn’t really a ‘true’ cross-platform browser experience either, but it seems the most fruitful path. Start learning JavaScript! :).

    That said, I’ve now seen an iphone, ipad, and Kindle IF interpreter running, and despite the downside of input, screen size, multitasking, etc., I still think any one of those is simply a more enjoyable platform than a laptop or desktop.

    • midiguru says:

      I’ve pondered the virtues of JavaScript. In fact, I downloaded “Aunts & Butlers,” a game written entirely in JavaScript, just to take a look at how it was coded. The prospect of rolling my own parser and library … well, it would be easier than creating an interpreter, but since I’m currently working in I6, there’s no need. My next game will be able to run in Parchment or Quixe.

      I think the ideal platform for IF is somewhere between a phone and a full-on laptop. But the question of what’s best isn’t important. What’s important or desirable is that a modern cross-platform interpreter exist. Will a browser-based terp run in an iPhone? I don’t know, but I can imagine that there may be technical issues there, to do with the size and shape of the display if nothing else.

  2. Jimmy Maher says:

    I’ve worked with the Kindle and its KDK development kit a bit. I would of course love to see IF take off and become a big hit on the Kindle, but before we get too excited over this latest Great Hope for IF Outreach, there are some sobering realities to consider even beyond those you mentioned.

    For one, the keyboards on the various models available range from barely usable to aggressively awful. This is understandable, as Amazon anticipated that they would be used only occasionally, when searching for new titles in the store or (perhaps) to make notes when reading — although I’m not certain that very many people use this latter feature. Playing a parser-driven IF game using this keyboard is not going to be a whole lot more fun than using a smart phone’s keyboard. Even the ergonomics of the device itself do not support easy typing while holding it in the hand.

    Second, these devices contain an ARM CPU running at 532 MHz, tuned for reliability and low power consumption rather than horsepower. Worse, the Amazon development environment does not allow any access to the underlying Linux operating system, but requires that all apps be coded to run within a Java VM running on top of said operating system. So, you’re looking at a Glulx VM running inside a Java VM running on a computer that runs at (at best) about the speed of the average PC from ten years ago. We all know that Inform 7 has significant performance problems at times even on modern desktop systems (although, of course, the team has partially addressed this problem via accelerated opcodes, and hopefully will continue to make improvements). Getting acceptable performance out of this thing will be, to say the least, a challenge.

    Third, the Kindle uses a very unusual interface, in which the scrolling text we are all used to is replaced by a paged model. Adopting an IF interpreter to work within this model will require significant thought and engineering. It doesn’t help that Amazon, oddly enough on a device that is all about text, provides no advanced text layout libraries at all. Thus you’re looking at doing low level canvas painting, rolling your own line breaks, etc.

    Again, I don’t want to rain on anyone’s parade, and I wish the individual you mention all the success in the world. I just think we should be aware that this is not going to be a straightforward weekend porting job; the challenge of making IF “work” on the Kindle is, shall we say, considerable.

  3. I appreciate the excitement and concern, but let’s also keep a positive attitude. I can think of several ways around any potential performance issues with the ARM CPU as well as the screen display issues. These are technical hurdles, not show-stoppers.

    And I agree with Jim….building a unified IF front on all devices is an ideal goal.

    And just to allay concerns about pay to play schemes, it’s not now nor has it ever been my intention to take advantage of the IF community. I’m here to provide an outlet for the IF community, not nickel and dime it for vanity publishing. I don’t see any scenario where the hobbyist IF community becomes a revenue stream.

  4. Ron Newcomb says:

    “So, you’re looking at a Glulx VM running inside a Java VM running on a computer that runs at (at best) about the speed of the average PC from ten years ago.”

    Someone tell me again why all our authoring tools don’t just compile to the thing that runs on the Java VM? I mean the Java VM is just about everywhere already.

    • midiguru says:

      Good point, Ron. Of course, TADS can compile to a Windows .exe, but that’s the only direct compilation that I’m aware of. I’d love to see that idea spread, and the Java VM may be the best target.

      • Jimmy Maher says:

        I’m 99% sure that the TADS .exe files are just the standard TADS interpreter packaged together with a story file.

        There are many special features that the Z-Machine and Glulx have built-in to support IF, features that the Java VM lacks. Could those featured be packaged into an IF library of sorts for Java? And could the standard Inform compiler be reworked to target such a system? I really don’t know. Interesting questions for some enterprising hacker perhaps.

    • midiguru says:

      It might be easier not to tinker with the compiler at all. Someone (not me, unfortunately) might be able to write a program that would take a .z or glulx file as input and output a free-standing Java VM app. You might even be able to do this by repurposing some of the code in Zoom or WinGlulx as another component. Dunno — I’m talking through my hat here.

    • David Kinder says:

      The trouble with removing the layer of indirection and compiling directly to some more common format is that you tie the whole system to that format. If you had to pick a format to compile to 25 years ago, it would have been an MS-DOS executable; 15 years ago, a Windows executable; 10 years ago Java; and these days the most tempting format is Javascript. While each of these choices would, at the time, have seemed reasonable, time would have shown all of them to be wrong. Well, except Javascript, which is the current one. I can’t claim I have any idea what might replace Javascript, but 15 years ago, who would have thought that a Windows executable wasn’t the way to go?

      • midiguru says:

        Good point, David. That reinforces my suggestion that the actual Inform compilers be left alone, that games continue to be compiled for the Z-machine and Glulx, as at present — but that some other utility be developed that would bundle the game’s byte code into a free-standing app.

        That idea could be taken several steps further. The bundling program might be set up to implement some form of copy protection, for instance, allowing authors to sell their games.

      • Ron Newcomb says:

        I’m picking a common *portable* format, which DOS & .exe formats have never been and never aspired to be. Plus, is not Javascript a scripting language rather than a real language? (I’m fuzzy on the details of it.)

        I mean, I get that sometimes technologies don’t last, and the argument you’re raising (David) is the same that many IT departments ask themselves: buy a solution or build one’s own? But since we don’t get paid to invent our own wheels, it seems exhausting to re-implement, say, portable VMs when an internet standard (even if de-facto) sits there.

      • Amy says:

        The problem with this viewpoint is that it’s binary centric. As long as source is properly kept, and the tools are available, it’s possible to up and move on a regular basis. And it may not even be necessary; the java VM is a portable intermediary format, well known and documented at this point. It functions for the same purpose as the Z-Machine did back in the Infocom days, except for a much broader purpose.

        As long as someone has the source and the authority to re-issue compiled versions, platforms can shift safely. But we don’t even know it’ll be necessary. We can still run z-machine files now, how many years later? I doubt the ability to run java apps will go away in the next ten or fifteen years.

    • vaporware says:

      The Java VM isn’t really everywhere: for example, it’s not on iPhone or Android(*) or WinPhone7. And even on platforms that have a Java VM, there’s a difference between desktop (SE) and mobile (ME) versions. Porting Java to a platform that lacks it is a much bigger task than porting Z or Glulx.

      (* Android uses the Java language but its own VM.)

  5. vkorablin says:

    Reblogged this on vkorablin.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s