Best way to implement a background image?

I apologize profusely if this is any of the following: obvious, already answered, a terrible idea, beating a dead horse, better solved through some other medium, or other unspecified offense to the IF universe.

I’ve got an idea I’ve been sketching out for a while. This isn’t my current project, and possibly not even the one after that, but the project that I want to work up to. So if this can’t be done yet (or done easily), it may very well be simple by the time I’m able to get to it.

Basically, I would like to create a story with the optional ability (for those with a supporting interpreter) to have a background image. This would ideally change at key points in the story line. The story should theoretically be strongly-enough written that it wouldn’t be necessary (so my wife can still play on her phone*), but would add to the atmosphere. Nothing in the images would be necessary to successfully play.

I’m probably not explaining it very well. Mockup done in FocusWriter:
mockup.JPG
I imagine this would be easiest in a web interpreter, which is convenient since that would be the mostly likely vector for the target audience. Would it be possible to embed the interpreter into a page which handles this (i.e. partial transparency, etc) via CSS? [I could break the story up into parts and load the new part as a new page (and thus image), perhaps?] Is there some obvious solution that I missed? I tried searching, but I’m afraid I may not know enough to ask the right questions. Finally, has anyone else done something similar?

[EDIT: Almost certainly, this would be written in Inform 7.]

[size=85]*She’s already seen all of my photos a hundred times, anyway.[/size]

I don’t have an answer for you, sorry, but I just want you to know that I would spend at least five minutes playing the hypothetical game for which your placeholder text was the actual text. Very If on a winter’s night a traveler.

Using images with Inform 7 means Glulx, and Glulx interpreters, IIRC, doesn’t support transparencies under the main text box. I’ve seen some cases where authors made an image frame around it joining several image boxes around the text and making sure they rescaled properly, which was tedious and not quite effective.

As an alternative, you can go the textfyre way: use the text input/output stream from a customized frotz interpreter through your own GUI written in something like Visual C# or Visual Basic and make it go web through silverlight. I think they made freely available some sort of kit to do something like that, but I’m not sure if that’s just my memory mixing things.

Yes, you can definitely do this in one of the javascript web interpreters (Parchment or Quixe, depending on whether you have a z-code or a glulx game). The image would be rendered by the browser, so it doesn’t matter whether the interpreter itself supports graphics (neither Parchment or Quixe does, in fact). Here’s an example of a game running in Quixe with a (presumably nondynamic) CSS background:

archimedes.plus.com/public/m … /play.html

So, that’s easy. The trick comes in getting the game to communicate with the HTML/CSS/Javascript layer. Here’s one way it could be done:

https://intfiction.org/t/parchment-experimental-extensions/1425/1

–Erik

Hear hear.

I would think implementation in Inform 7 could be somewhat problematic: “There is a room called a room. A thing called a thing is in a room under a thing that is over the thing but is not the thing that you were thinking of previously. Oh bother.”

Likewise for game play.

x thing

You’re trying to induce a schizophrenic episode, aren’t you?

Well, there’s always Things.

[quote=“ektemple”]
https://intfiction.org/t/parchment-experimental-extensions/1425/1]
That is sloooooooooow! I got an “unresponsive script” message three times before the game loaded, and I got another one after making a move (clicking on glove compartment).