HTML TADS 3 Web UI -- Need Help!

I’m trying to get my IF Comp game Hill Ridge Lost & Found playable in a browser. The latest HTML TADS dev kit is supposed to let you do this. But I’m not getting very far. I’m completely stumped, and I hope someone will be able to help.

I have the latest devkit, and I’m running Windows 10.

The problem seems to be javascript errors that cause a hard crash of the player. First, I get a message from Windows saying htmltdb3.exe has stopped working. Then several “Script Error” windows come up that point to various .js files in the webuires folder. (Example: expected “}” on line whatever.) There doesn’t appear to be anything wrong with the javascript files themselves.

I can get the Introductory Game (the one with Entryway, Hallway, and Kitchen) to work, but I get those crashes when closing the Player window after the game ends. After that, I need to reboot in order to get it to run again, or else it will crash right away.

I don’t have any ideas at this point about what to try. It just looks like the whole devkit doesn’t work in Web UI mode.

Strange. I would rather say the JavaScript errors are reactions to htmltdb3 crash and not cause, but I don’t know. When the crash occurs? It’s immediately after running, after some fixed time, random or in a reaction to same command? I’m not much familiar with devkit for Windows, so I’m currently not aware how it should work. Maybe I’ll try tomorrow.

For the sample game, it crashes when I close the Player window the first time, then every subsequent time, it crashes upon loading, before displaying any text. With my game, it usually crashes right away, but sometimes it makes it to the first More prompt.

I’ve had those same problems for years now. I’ve come to the conclusion it is the local web server stand-in that is crashing. The game will not crash at all if it’s not web-ui. I assume the problem won’t go away till that component is updated or replaced.

You don’t have to reboot though after 1-3 crashes in a row it should run again for 1-2 runs before crashing once again. I now expect to have to reload the workbench before each test. It’s annoying but I live with it as I don’t expect the problem will ever be fixed.

Thanks, DavidPT. I’ll mess around with it some more.

Do you happen to know of any more TADS Web UI resources? The documentation is skimpy, and there are some things I don’t know how to do.

This is just a wild guess because I am by no means an expert, but a game I’ve been working on kept crashing when it got to a “More” prompt. So try removing any code you’ve got that might trigger it (for example inputManager.pauseForMore ).

Best of luck,

–Bob

As for the crash, I’ve still didn’t have time to reproduce, but found an article here: http://tads3.livejournal.com/9433.html which indicates this happened in past. Are you sure you have latest version including this fix? For the record I’m compiling and running webui games in frobtads on linux and it is rock solid, so in worst case there is workaround.

As for the documentation, you can look here: http://www.tads.org/t3doc/doc/sysman/web.htm and there are also some blog articles here: http://tads3.livejournal.com/7082.html, http://tads3.livejournal.com/4250.html, http://tads3.livejournal.com/4495.html and http://tads3.livejournal.com/4760.html. All those articles are mainly about the whole architecture of the web play mode, but if you want to do something specific you need to know web technologies well (HTML, CSS, JavaScript and TADS) and must read through the source code of the frontend which is thoughtfully commented. If you have specific questions about webui, just post them to the forum, ideally as a separate thread.

I believe this is the bug in question: bugdb.tads.org/view.php?id=165 It’s marked “resolved”, but I still have the same issue too. It’s really discouraged me from working on any of my experimental-UI/web game ideas in TADS.