How do I play test a TADS webui game?

Recently, I’ve revisited one of my TADS3 projects - The game will be web browser enabled TADS game, because well, it’s not the 2000’s anymore.

I’m using the tads web server link - but the documentation says to upload your .t3 file to the ifarchive for play, which takes 2-3 days of wait.

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

Seriously, every time I want to play test my game on the web, I have to recreate a new entry in the ifarchive and wait several days?

I don’t know of any other file servers that still use HTTP: over HTTPS: Again, it is 2022…

TADS is a powerful language, that’s why I chose it, but I now understand why Twine is taking over the IFComp.

Is there really no good solution for this dilemna?

2 Likes
(Expandable section, containing a complete log of me embarrassing myself with my own uninformed confidence.)

I don’t use Twine, so I don’t know if it’s a constantly-online editing system, but the general process in software development is you create and test the service offline first, and then publish it when it’s done.

For offline testing, I recommend QTADS, which offers a lot of HTML functionality.

(It might be 2022, but the idea that everything should run in a webpage is just a corporate trend, in my opinion. Webpage functionality should be a neat bonus; not the default. But that’s just me.)

(This post was heavily edited for tone. I didn’t realize the original version could be read as aggressive; that’s what I get for having a social disability, lol. I’m sorry for the original content, especially if you read the non-edited version in an email notification first.)

EDIT 2: Okay, I did some reading, and it seems that WebUI TADS is apparently different from HTML TADS…? I’m going to need to do some testing real quick before I have a more informed answer. I’m sorry for posting so fast. TADS 3 is my main way to create IF, but I still have much to learn! I will report back after testing!

EDIT 3: Aha! I should not have replied at all! The QTADS interpreter does not run WebUI, because it is different from HTML TADS, contrary to the incorrect assumption that I have made all these years! I have learned something today! I’m going to search for some offline testing strategies for WebUI, because it would be really weird and clumsy if you are forced to upload to the ifarchive and wait between tests…!

Okay, so here it says that you can run a WebUI game in “standalone mode” for offline testing:

Local single-machine (stand-alone) testing
One of the main reasons to create a Web UI game is that it allows users to play on the Web, without having to download your game or install software. However, Web UI games can also be played without a Web server, a browser, or a network connection. Most TADS interpreters let you play a Web UI game in “local” mode, also known as standalone mode - this means that you run the game on a single computer without a Web server involved.

You’ll probably want to use standalone mode while you’re developing and testing your game, since it would be inconvenient to have to upload your game to a server every time you recompile.

The problem here, though, is I’m on Linux, so I can’t use the standard development workbench. These instructions might make sense to a Windows user, but there’s also a likely case that this is really vague to a Windows user, and also does not help non-Windows users.

Also, I already attempted the trick where you build the url like:
http://gs.tads.io/?storyfile=file:///home/username/Downloads/ExampleGame.t3
but it hits a security issue and just refuses. I had assumed the runner was just a webpage and could use local files, but it’s apparently not.

I’ll keep looking, assuming the “standalone mode” is too vague.

EDIT: I just tried the trick of setting up a local server with
python3 -m http.server 8000 --bind 127.0.0.1
Now, quick disclaimer: The WebUI runner could not retrieve the file.
I got the same error before and after running the server:

Error details: Story file location: http://localhost:8000/ExampleGame.t3
Network error 0: php_network_getaddresses: getaddrinfo failed: Name or service not known

Which means that it’s not seeing my server at all. This means that either it needs something a bit more “set up”, or I might need to port-forward my tiny test server to the wider Internet, which I’ll try next. However, if this is the solution, then it’s a pretty sweaty solution! However, it seemed to work for this user, but again: I hope another forum user here can provide a better solution that either clarifies “standalone mode”, or provides a less-sweaty file hosting solution for testing WebUI, because Clint is correct: Hosting on the ifarchive and waiting a few days between tests is not a worthwhile solution.

1 Like

Okay, I have returned after my port forwarding adventures!

Similar to before, I put ExampleGame.t3 (a WebUI TADS 3 game I found somewhere) into a directory.

I then went into my router settings and forwarded port 8000 from my computer to the Internet.

From there, I open a terminal in that directory (again, I’m on Linux, but this should also run for Windows) and ran the following command:
python3 -m http.server 8000

When it said the server was running, I then went to a service checking website to verify that the Internet can see the http file server running on my machine. It passed the checks; woohoo!

I then opened a browser window to
http://gs.tads.io/?storyfile=http://my.secret.ip.address/ExampleGame.t3

I got a timeout error!

“But Jess,” says the mysterious machine spirit, haunting my room, “you didn’t put in your port!”

“Correct,” I reply to the spirit, “and this error of mine will come in handy later!”

You see, I then corrected the address to:
http://gs.tads.io/?storyfile=http://your.ip.goes.here:8000/ExampleGame.t3
which clarifies port 8000 to be connected to!

And I got the same error as before:

Error details: Story file location: http://localhost:8000/ExampleGame.t3
Network error 0: php_network_getaddresses: getaddrinfo failed: Name or service not known

THIS IS SIGNIFICANT because this could mean that the WebUI runner has seen my server this whole time, but simply did not know how to process the connection!!

There is a huge different between a “timeout error”, and a “network error 0”:
One implies no connection at all,
while the other implies a successful connection but a failed file retrieval!
(I would like for someone to confirm or correct this; I’m already anxious from my previous error.)

However, THIS STILL DOES NOT WORK FOR TESTING, EITHER WAY, and I could not find any resources online that clarifies how someone might do this correctly! The vague mention of “standalone mode” might not be clear enough to people who can use the official workbench, and it doesn’t provide any information at all to those of us who want to write TADS 3 WebUI games on a Linux with something like VSCode.

I feel rather crushed knowing I couldn’t redeem myself for my previous bout of incorrect overconfidence, and I’m still really sorry about that. Hopefully someone with more direct experience with this can help out. TADS is an amazing system, and even if I prefer to keep everything offline with HTML TADS, there should absolutely be options for those who would do this online with WebUI TADS!

1 Like

It’s basically a special mode of the Windows interpreter where it acts as both the web server and the browser within the same application. (I don’t think it’s 100% still working as intended – it talks about not being able to install Flash Player, but then works anyways?) Contrary to the statement in the manual that you cited, “most TADS interpreters” do not actually support running WebUI games, as you’ve already noticed.

For local testing during development on non-Windows systems, you can use the frobTADS interpreter, which supports WebUI hosting. Install it, then run it on your system with networking enabled, like this:

frob -N 0 yourgame.t3

It should then output a line like this:

connectWebUI:http://localhost:36921/?TADS_session=12db2186-d904-e2d6-cf16291a7b64-8bab

Paste the part starting with http: into your browser, and you should be good to go.

If you want to offer the game for other people to test, the most straightforward (least convoluted?) way is probably to rent a domain and some basic web hosting, and point the gs.tads.io runner towards that.

3 Likes

Oh my god, thank you so much.

It is so difficult to figure what search terms to put into Google to find any information on this sort of thing. I keep finding the same 3 manual pages and then it starts overlapping into some kind of corporate technology that uses “TADS” as an acronym.

It felt like I was trying to squeeze water from a stone.

I’m very much not deeply familiar with the various TADS toolchains, but I believe it’s possible to play plain-vanilla (i.e. non-WebGUI) TADS games in a web browser using the latest version of Parchment – this is how IFDB has “Play Online” links for TADS games these days. I think you can just point https://iplayif.com/ at the story file, so if you can sort out hosting – or just send testers a local copy to feed into the site, which is an option too – that should be quick and easy.

Apologies if this is not a helpful solution, since again, I am very much not up on the details here, but thought I’d kick that in as a low-overhead possibility.

Also FWIW I don’t think the upsurge in Twine games has much to do with awkward TADS utilities – I think most folks making choice-based games are making them because they want to make them, while to the extent some TADS stuff is a little annoying that can push authors to Inform. Though I also see lots of folks frustrated by Inform who are excited to discover that TADS works better for them!

3 Likes

This is kind of what I’m thinking too. TADS doesn’t have a very large user base (comparatively, I mean), and Twine currently has a massive amount of attention from the indie dev scene, and I don’t think it has much to do with how web-based it is.

Indie devs usually find Twine because other devs in the scene recommend it (similar to the popularity of Unity3D, Unreal, and Godot).

A lot of authors, meanwhile, usually find Inform 7 for similar reasons, and then people who are specifically looking for coding solutions usually have to dig around a while to even find TADS (at least that was my experience).

None of these have any kind of advertising campaign, so it’s very much word-of-mouth, I think.

I originally thought Inform 7 was the huge thing, and I hadn’t even heard of Twine until I joined the forums.

2 Likes

This TADS WebUI thing has always confused the hell out of me. For the similarly confused, this thread does cast a bit of light on it:

Note Dan Fabulich’s assertion that “No modern OS/browser can play WebUI TADS 3 files in 2022”, which suggests it’s a dead end to develop a game for WebUI in any case (I have no idea if he’s right though).

2 Likes

Yeah, I think my post is the canonical answer here:

https://intfiction.org/t/issue-running-tads-on-my-pc/56193/8?u=dfabulich

tl;dr:

  • TADS has two kinds of .t3 files, “regular” and “WebUI”
  • No modern OS/browser can play WebUI TADS 3 files in 2022
  • Despite that, Parchment can play regular non-WebUI .t3 files on iplayif.com
  • I’ve updated IFDB’s File Formats page to explain that “TADS 3 Web” games are unplayable, but still link to HTML TADS, for legacy use
2 Likes

The original comment was “I now understand why Twine is taking over the IFComp.” Well, Twine took over[*] IFComp from Inform, not from TADS. TADS has never been a high percentage of IFComp[**], and very few TADS WebUI games have been entered at all.

[* To the extent it did, which is really not much unless you’re obsessed with winner-takes-all races. Non-Twine games remain a big part of IFComp.]

[** Okay, except 1995.]

2 Likes

OK so upon further inspection it’s relatively straightforward to make a small application based on QtWebEngine that can stand in for tadsweb.exe (the display portion of the “standalone mode” WebUI interpreter on Windows):

Once I get back from vacation I’ll look into making a similar application for Mac and Linux that interfaces with the frobTADS interpreter.

6 Likes

Thanks for this - it would be incredibly useful to be able to test WEB UI games offline. Is there any more information about how to set this up? It would be particularly useful to know which lines of the actual TADS code I’d need to change to get it to work with the QtWebEngine application.

1 Like

Well at least for the Windows version I’ve finally gotten around to packaging and uploading it to my website: TADS 3 WebUI Viewer - diepixelecke.de

The download consists of an executable installer that will patch your existing TADS 3 Workbench installation to use the new viewer.

2 Likes

An automatic install into my existing Tads implementation make me wary.