Web UI problem

When I compile a game for web ui and run it locally, I see, at the very beginning, the flashing of an alphabet of a large calligriphic font, and then it goes to the game. However, tiny squares appear in the text where many of the spaces should be, as if the space character being used were missing from the font.

I get this behavior when I start with a completely fresh web ui t3 project and immediately compile and run the wizard’s sample game.

Any idea what’s going on? I suspect it is a font issue, so any pointers to info on how the computer fonts are utilized in the web ui? I also suspect it may be a problem with the embedded browser. I’d like to test it on firefox or chrome. Is there any way to do that short of uploading the file to ifdb?

Thanks.

WebUI is scripted to do some font tests and measurements at the begining. It employs flash plugin to enumerate fonts on user’s computer and then probably tries to measure/test something. However this test div is positioned by CSS -10000px in browser’s windows, so it shouldn’t even be seen. So it’s hard to tell whats going wrong. If you want take a look, you probably should start in lib/webuires/main.htm where you can find div with id “__TADS_swf_div”.

Thanks. I care less about the flashing calligraphic letters than the “can’t find special character”-style square that is showing up in place of many of the spaces. Actually, I don’t even care about that if I can somehow verify that it will look right when I publish the file and it is played via ifdb.tads.org.

Is there any way to test the file in an actual browser? What browser is TADS using to display the web ui file when tested locally? Can I control that? (I heard it uses Internet Explorer – is it using some bundled version or just whatever is on my system?)

If you can upload your game somewhere where it’s accessible through HTTP, then you can play it through gs.tads.io. For example:

gs.tads.io?storyfile=http://foss … persWeb.t3

In general:

http://gs.tads.io?storyfile=LINK_TO_YOUR_GAME.t3

I’m not sure, but a DropBox link might work too if you don’t have an HTTP server.

Thanks. That worked great, and I don’t see the strange characters when running on a modern browser. I wonder why it looks so funny when I run it locally from the TADS workbench. Maybe it’s using the ancient version of Internet Explorer that’s on my computer (I never use it, so I’ve never updated it) and that’s the source of the problem.

You should update it. IE on Windows is used for more than just the Internet. It provides some key components for the operating system. Having it up-to-date is actually vital for the health of your system.

  1. Testing out the Web UI, I find that at the end of the game, when you type “quit”, the browser displays an error rather than exiting gracefully. Is this an issue that I can fix in my code, or is it a TADS bug?

  2. I’m thinking that the default web page, which allows the command window to span the entire width of the page, makes it awkward to read the super long lines of text. I think it would be better typesetting technique to restrict the window to some reasonable width. I understand that everything is tweakable, and there’s probably some magic value in one of the the css files in webuires I just need to adjust to make this happen. Before I go experimenting with this, I thought I’d check: has anyone here already done this and figured out what to adjust?

On a related note, I think it might be fun to add a graphical game-themed background to the banner and/or side margins on either side of the command text. Anyone already figured out how to do this and want to share an example?