Tads 3 and Adding Images

Hi All,

This is a really basic question but I seem to be going round the houses in the online guides and not getting anywhere. I like the look of Tads 3 and have been able to create simple rooms, navigation and interaction relatively quickly.

But my aim is to recreate a style of text adventure I fell in love with as a kid. Games like the Level 9 and Melbourne House adventures on my trusty ZX Spectrum.

To this end I want to create a game that has a graphic image for each location/room in the game which takes up the top half of the screen. See image below:

http://grytekstowe.pl/sites/default/files/public/galeria/ms-dos/the_Jewels_of_Darkness_Trilogy_ms-dos_scr-4.png

In addition, I’d like to force the game to at least start with a bit mapped font similar to that in the spectrum games.

All my attempts to insert images using HTML have failed miserably and I have not got round to attempting fonts yet. I suppose my questions are:

  1. When using the command how and when would I add this to a room description in order for it to be present for each room?
  2. Is it possible to force a bit mapped font of my choice?

Any advice would be greatly appreciated.

Dunno about the fonts, but my guess is that font usage is liable to depend on the interpreter and the end user’s available fonts.

The image, though … I couldn’t find a copy of the source code for my game “The White Bull” (stupid, stupid author, losing his source code!). But I managed to figure it out by trying a few things.

First of all, the article “Resources in HTML TADS” says this: “The location of the ‘current page’ for HTML TADS is always the directory that contains your .GAM file or .t3 file.” But that seems to be wrong, or at least partly wrong. I was able to load an image by putting the .jpg in the directory with my source code, not in the debug directory, which is where the .t3 file ends up when the game is compiled.

Second, the tag needs to be in a string that will be printed, which means the quotes in the URL have to be escaped using backslashes.

Third, the .jpg needs to be added to the Resource Files list in the Project pane of Workbench.

Having put the .jpg in the right place and added it to the Resource Files list, I was able to do this:

startRoom: Room 'Start Room' "This is the starting room. <.p> <IMG SRC=\"cello.jpg\">" ;
This code places the .jpg on the next line after the text.

To get it into the upper half of the screen, you’ll need to do some sort of multi-windowing environment. I’ve never done that, so I can’t be much help.

About the fonts - acording to documentation http://www.tads.org/t3doc/doc/htmltads/deviate.htm it seems that it is possible to select any system font apart to basic TADS fonts, however it is probably not possible to embed custom font and use it. In addition this is valid for multimedia interpreters as is HTML TADS or multiplatform QTADS, however not for Gargoyle which is plain text interepreter with its set of optimized fonts.

On the other hand if you will target web play only, you have wide open posibilities to use whatever you want and what modern internet browsers supports including custom fonts using font-face and CSS styling.

Thanks for the advice. The images worked a treat. Once I have that nailed down and see what options with fonts I have.