Easiest way to make a TADS 3 game playable online?

After a long hiatus from the world of IF, I’m considering writing some of my own stuff. That is, if I can ever actually finish a whole game.

I was wondering, though… what’s the best way to make a TADS 3 game available for online play, in a normal web browser? I confess I don’t understand how to implement HTML TADS in that way. I do have some experience with setting up web sites, so I’m not a total newbie. Do you need an actual back-end server, or is it something that can be handled with HTML and JavaScript? Are there any existing guides to setting up a browser based game? Does anyone out there already host a service that makes this possible? That would be the ideal solution, I think…

I did notice a recent thread on making TADS 2 playable in a browser. I was hoping, however, that something similar might have happened for TADS 3. Any thoughts?

EDIT: I did find this: https://intfiction.org/t/html-tads-3-web-ui-need-help/10611/1 – though there seems to have been several problems. Anyone ever get it working correctly?

Well, I did manage to fool around and get tads3 (dos version) to run in js-dosbox, but it’s kind of klunky still.

howtophil.com/tads/

(less clunky in Chrome for whatever reason)

To set up your project so that it creates a WebUI-enabled game file, follow this guide from the System Manual:

tads.org/t3doc/doc/sysman/webui.htm

When you’re ready to publish the game, upload the game file somewhere, and use the gs.tads.io service to run it (it provides servers hosted on Amazon AWS.) You only need to provide a link to gs.tads.io that loads the game file from somewhere on the internet. This looks like this:

http://gs.tads.io/?storyfile=http://example.com/MyGame.t3

See this game for a working example:

ifdb.tads.org/viewgame?id=pjvpa5u0sej5enyf

(Click the “Play online” link in the upper-right.)

You might want to keep your game non-WebUI compatible, so that it can be played in normal interpreters locally. You would need to keep two project files (.t3m files) for this, one set up for WebUI and one for the normal version.)

1 Like

To howtophil:

I checked out your site, and js-dosbox is definitely something to think about. Although I do feel a little old, knowing that a whole operating system I once used can fit into a browser…

To RealNC:

Thanks for the info! I’m especially happy to learn about the gs.tads.io service. That simplifies things a great deal.

I know the feeling.

Well, to make you feel better, it’s not just DOS that fits in a browser. It’s modern operating systems too:

bellard.org/jslinux/

I’m trying to follow the method above so that I can test my Web UI game in a modern browser (rather than the standalone version). So, I build the game in Workbench (on Windows 10) using the ‘compile for release’ option in the ‘build’ menu, which gives me a .t3 file.

I upload this to Github, and then link to it using gs.tads.io/?storyfile=[url]

However, I then get the following error:

Error
The story file doesn’t appear to be a valid TADS game file.

Try again

I’m changing the https:// of the Github address to , but I assume that isn’t what’s causing this problem. I’ve tried different .t3 files, and I always get the same error. I should also mention that the .t3 file works fine locally.

Is there something obvious I’ve missed?

Maybe wrong url? Don’t forget that the parameter should be url encoded especially when containing conflicting characters.

Are you uploading it to Github as a released file, or are you linking to the repository?

I tried linking to the released file (and encoding the url), but now when i try to run the file from Github, I get the following:

Error
A network error occurred retrieving the story file.
Try again
Error details: Story file location: github.com/Otto73/TADS3/tree/1.0/Ward_Z.t3
HTTP error: 301 Moved Permanently

Using a different hosting service (again, with an encoded URL) , I still get the ‘storyfile’ error:

Error
The story file doesn’t appear to be a valid TADS game file.
Try again
Error details: Story file location: 000webhost.com/members/websi … /Ward_Z.t3
This file isn’t a valid .t3 compiled game file. Possible causes:
the original Web link you clicked to launch the game is broken
the story file on the server is corrupted
the file was uploaded with a compressed format such as ZIP, rather than as a plain .t3 file
the file was garbled while being transferred across the network
You might try again, in case the problem was a random network glitch or other temporary condition. If the problem persists, you should contact the person who maintains the page where you found the launch link.

That’s not a link to t3 file despite t3 extension at the end of URL, but rather a link to HTML page with a description of the file. If you want to link to the file, you need to link to github.com/Otto73/TADS3/blob/1. … 3?raw=true URL, but unfortunately TADS launcher does not support HTTPS protocol, you need to host your file somewhere it is accessible over plain HTTP.

That’s not valid URL of game file, it just redirects to login page, probably it’s not shared publicly.

Many thanks -

I’m now able to run the game through gs.tads.io. I wasn’t aware that I needed to add ?raw=true to link to the actual file. I still can’t launch it from Github, but it runs fine from ottocondliffe.000webhostapp.com/ … 3?raw=true. The site is set up for https:, but it seems to work fine just changing the address to http:

That’s not a URL to a t3 file. That’s a link to an HTML page. You need a link to the actual t3 file. Try this:

github.com/Otto73/TADS3/blob/1. … 3?raw=true

Thanks - however, when I try to run the game from the address above, I get the same error:

Error
A network error occurred retrieving the story file.
Try again
Error details: Story file location: github.com/Otto73/TADS3/blob/1.0 … 3?raw=true
HTTP error: 301 Moved Permanently

I can only guess this is something related to Github itself, as the file runs fine from ottocondliffe.000webhostapp.com/ … 3?raw=true

That’s because it’s redirecting to HTTPS.

That gs.tads.io doesn’t support HTTPS should be considered a bug.

You could use Github pages which doesn’t require you to use HTTPS.