how to use display?

im confused… i read the display help page and i dont know how to use it…
it says i need glulx to show a picture…
but its also saying i need it to show text like with the display action im confused do i need it dor the command and how does it work

Glulx is a format. It’s the current one after zcode which had space and memory limitations. If you are in the latest version of Inform and you haven’t specifically gone into the settings and chosen to work in zcode, you should be working in Glulx. (You can think of zcode as DVD and Glulx as Blu-Ray - they’re kinda the same but not always compatible depending on your player, and one has a smaller filesize than the other…)

To show a picture, you need to go into your “materials” folder that should be in the same directory as your project and create a folder called “Figures”. In this folder you put the images you want to use in .jpg or .png format.

Then in your source text for game you declare the figures. Inform expects your images to be in the Figures folder in the Materials folder.

The figure name needn’t match the filename, but you have to use the figure name in your source text once you’ve declared it. It also expects you to call it “figure of [whatever you named it]”.

Then to display the picture that you have named with a figure-name, you use “display figure of Woodlands”. The trick is you need to display your figures as part of a rule during gameplay so Inform knows when to show them.

When play begins: display figure of Woodlands.

After taking the snowglobe: say "It's a pretty woodland landscape." display figure of Woodlands.

Be aware that if you are using Mac, I don’t believe the figures will appear as you test your game in the IDE - where you run it side by side with your code. You need to Publish for Testing or Publish and play the resulting gblorb (in a Glulx capable interpreter - most modern ones) to see the pictures.

As a side note, Inform will embed the figures, cover, and small cover into the Gblorb file and you shouldn’t need to include separate image files.

If you publish the game as a website, you do need everything in the “Release” folder it provides and the cover and small cover in there for the website to display, but I believe the figures are all within the game. As long as you publish the index.html file with the structure it provides in the release folder, it should all work.