Background Processing in Interactive Fiction

Posted: July 2, 2010 in Blogroll, interactive fiction, Textfyre
Tags: , , ,

While working on zifmia it occurred to me that I might want the VM to continue running in the background. What if I have a real-time daemon that interrupts the command line after the player has taken too much time? and then I got to thinking about how this could be hacked into the existing I6/I7 infrastructure.

And then I thought that if this were possible, I’d want a more elegant solution and came up with the idea of meta-turns or background turns. The idea is that while the player is contemplating their next move, the VM is offering that spare time to the game to do anything it might want to do. There have been discussions about the need for threading in our interpreters and VM’s and I think I’m starting to see the value.

The most interesting idea is comparable to a game of hide and seek in a house. I do this with the kids once in a while and it’s fun. But it’s really funny when they run to one side of the house and I move to a location they have already searched. This drives them mad, but eventually they start logically nailing down potential hiding places and figure it out.

The same thing could happen in an IF game where state is changing internally, but unless it happens in the current player location, there is no output. So an NPC could walk through ten rooms while the player thinks being none the wiser. This opens up some interesting puzzle development possibilities.

The two main features required would be somehow tagging certain code to execute what I would call a “meta turn” in the background and then allowing the background to interrupt the command line and send output if anything “in scope” changed.

I’m not interested in math or path calculations in a background thread. I’m much more interested in the thematic possibilities.

About these ads
Comments
  1. Paul F says:

    Isn’t this what Border Zone did for it’s “Realtime” gameplay? I believe there are already Z-Code Opcodes to handle this kind of thing.

  2. Dannii says:

    Those kind of possibilities should be possible in Guncho now (also using the client-server model.) It’s been a long time since I explored Guncho, but it would be interesting to see again what people have done with it.

  3. Sarah says:

    Funny you should mention this, because I’m working on a story that does exactly that. To go with it, I hacked up a real-time extension for Glulx that *schedules* events in real time to fire on the player’s next turn. So after five minutes or so you could have an event schedule some meta-message.

    (No, the version up on the I7 site doesn’t work with the new build, but I’ve cheated a bit (well, Erik Temple cheated a bit and I copied that) to make it work. Kind of reluctant to offically release it with the cheating, but if you want it I can offer it.)

  4. Oliver says:

    One could do i.e. pathfinding while the player is contemplating her next move.

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