Displaying figures

Ok, I see what you were saying.

So this is what I found:


I’d love to give it a try! How would I go about doing that?

You could create a new Inform 7 project from scratch that only contains the “tan page” object and your code to show the exodus1.jpg image when examining it. Make a new Figures folder in the materials folder of the new project and put the exodus1.jpg file in it. Run it to see if it works. Zip up the files of the new project including the image, upload the zip file somewhere and share the link.

2 Likes

As the message “Missing from the Figures folder” indicates, it looks at least from Inform’s perspective as if the files aren’t actually there in the folder on the hard drive (which would also explain the error message from this post: Displaying figures - #9 by Spuncounterguy).

So the next step would be to double-check if they are there. It seems so, going by your first post, but it would be worth checking again, making sure it’s the correct path and everything. If they are actually in there, then maybe there’s a problem with file or folder permissions, I don’t know.

And making a separate project as per Petter’s advice is a very good idea. :+1:

2 Likes

Also, check the image file info in Finder (by selecting the file and pressing ⌘+i). It is possible to create a file which looks as if it is named “exodus1.jpg”, but which is actually named “exodus1.jpg.png” or similar with a hidden second file extension.

If I remember correctly, Inform placed my game’s initial file in documents. Is that where it would also look for the figures? Or do I need to move them to a different place or possibly create a new path to tell the program where to find the images?

It looks for them in the “Figures” subfolder within the “<Your project name>.materials” folder. The “....materials” folder should be on the same folder level as the “<Your project name>.inform” folder.

Going by the error message from the screenshot you posted here: Displaying figures - #9 by Spuncounterguy, it is indeed (indirectly) in the documents folder; it’s looking for them in:
/Users/timbuchanan/Documents/the ark of liberty/The Ark of Liberty.materials/Figures/’.

1 Like

Ok! I’m making some progress. I copied all the code and created the same game with a new name and now the images are showing up in the index.

BUT now I must have the display figure code out of whack but I get the ‘more’ icon at the bottom of the screen without it allowing any movement even after hitting return.
Screen Shot 2021-10-11 at 5.48.07 PM

Instead of examining the bucket:
	display figure of WorldSlavery;
	say "You find a few sheets of paper taped on the inside of the bucket. 

I’m not on a Mac so I can’t help much there, sorry, and I’m not completely sure what the issue precisely is. What do you mean by “movement” here?

Can you click on the “More” icon?
Does the story window have the keyboard input focus?
Can you press Space instead of Return?

Is the picture so big that it does not fit into the window together with the output text at once, causing the IDE interpreter to pause and show the “More” icon?
Try it out with a small picture, for example 300x300 pixels.
And/or press “Release” to let Inform package the game and the graphics into one “gblorb” file and try out that file in an external interpreter like Spatterlight. (Just to be clear, this only means that Inform prepares a releasable version, it does not actually upload or publish or release anything.)

Also, it’s probably just a copy-paste error, but note that you are missing a closing quotation mark at the end of the say statement in your code example.

1 Like

Maybe the size is the issue. Some of the smaller images work much better/quicker. I tried to find the biggest images I could find just for quality sake. So I should reduce them, you’re saying?

Or is it possible that on the release that the size will not matter?

One other question, when I “release” the finished product, how can I play it or upload it?

Not necessarily. I was just saying that you could try out smaller images in order to see whether that makes a difference in the specific situation with regard to the “More” behaviour which you are seeing.

What kind of resolution you should be aiming for in general is hard to say.

On the one hand, many people will have screen resolutions of 1920x1080 or more.

On the other hand, most will probably not play IF games in a full-screen window, because it’s much too wide for comfortable reading.

In general, it’s okay to have high-resolution images, because of the quality, as you say; and I think the interpreter programs which are used to play the games will usually scale them down if the game window is smaller than the graphics size, so they won’t be cut off. (Although that’s something that beta-testers should try on various interpreters and operating systems.)

Which leads us to the second question:

Interactive fiction games are usually distributed in a format which is not a stand-alone executable, so you need a separate application to play them, which is called an “interpreter”, similar to how you need a music player to play MP3 files or an ebook reader program to display ebooks.

One such program for the Mac is Spatterlight, which I linked to above. Download the zip file from there, unpack it, and run the program, or download the version from the Mac App Store here: ‎Spatterlight on the Mac App Store.

When you “release” the game in Inform, it will create a “<Your game name>.gblorb” file, located in the “Release” subfolder of the “<Your game name>.materials” folder. Open that gblorb file with Spatterlight to play it.

As mentioned above, you can do that at any time, it does not need to be finished. This is just private testing for and by yourself, on your own computer. (You can of course also send that “gblorb” file via email to other people, for example friends or beta-testers.)

Uploading is a different question. You could upload it to the IF Archive at http://ifarchive.org/, for example, but that makes sense only if it is really finished.
Another possibility would be borogove.io. There are various other options for putting it online, but that’s getting ahead of things.

2 Likes

It worked! Thank you so much. It was so cool to see the release version. A dream!

One last question: is there a way to change the background color from white to black or another color? And that said, can the text color be changed?

You could use the extension “Glulx Text Effects” by Emily Short. Version 4/140425 is built in, and an updated version 5/150123 can be found here: https://github.com/i7/extensions/blob/master/Emily%20Short/Glulx%20Text%20Effects.i7x

But there is no guarantee that its features are supported in all interpreter programs, and often the interpreters also allow users to override game style settings, so you can’t be absolutely sure that the game will look exactly the same as on your computer everywhere else.

2 Likes

Yeah, it sounds like I shouldn’t push my luck.

Thanks again!