T3 in a Browser

I’m contemplating developing a new game. I would personally prefer to use TADS rather than Inform. Trouble is, the Inform community is developing some good tools for running games in Web browsers.

I’m afraid this is going to kill T3.

If I want to write a game that can be played by casual users (those who are not committed enough to find and download an interpreter), it appears I have to write in Inform (either 6 or 7). I’ve made a comment to this effect on the TADS System Development forum, but after an initial flurry of conversation, the topic died down. I’m not seeing any indication that anyone is actively working on it.

Am I alone in seeing this as an issue?

I’m not a real programmer; I would have no way of writing a T3 terp in Javascript. I’m dependent on the kindness of strangers. But I’d sure like to develop a groundswell of sentiment on this subject, so as to encourage someone who has the ability to tackle the project. Can I get a witness?

I don’t think there’s actually any doubt that this would be a good and desirable thing; my impression was more that MJR had some pretty challenging, long-term idea about how to do it, and that while he was planning to take action, it might take a little while. I may be misreading, though.

If there’s anything to be gained from expressions of “Yeah, that would be cool!”, then:

Yeah, that would be cool!

I don’t have anything useful to add to the thread, but I’ll chime in to say that I’ve been planning to introduce IF to people on a web forum that discusses speculative fiction (all kinds of science fiction and fantasy). The easy availability of Z-code games on the web browser is definitely a plus, but there are also games that I’ve enjoyed and would like to recommend for beginners that run on other VMs. This is a real unmet need, and we’d all be indebted to whoever is willing and able to fill this need. Also, many thanks to Dannii, and everyone else who contributed to the existing Z-code web interpreters. :wink:

I believe MJR’s idea involves running a server-side terp. That might indeed have advantages compared to a Javascript-based terp. I’m not technically minded enough to know.

At the moment he’s involved in enhancing the basic language. His ideas are brilliant (as usual), but I wouldn’t be surprised if that’s where his main energy is going. And … well, if nobody else has the time or the chops to do it, it won’t happen for a while. Which will further shrink the user base of T3 authors, which will make any sort of development less urgent, and so forth. The melting snowball effect.

It’s not that I couldn’t do the game I’m designing in I7 (or in I6, for that matter). All a text game is, is a bunch of text, a bunch of variables and if-tests, and a containment hierarchy for holding in-game objects. You can do that in any decent language. (Adrift … well, maybe, maybe not.) It just comes down to my personal style – how my brain works. I like an object-oriented system. Plus, I like splitting the source up into multiple files, I like starting with a big library rather than a small one, I like multiple inheritance… I could do all that in I6, but then I wouldn’t have an IDE. I’d be running the compiler from a batch file or a terminal shell, I wouldn’t have syntax coloring, all that stuff.

It’s a real conundrum. None of these choices is bad, though. I have to admit, I’m mostly just shilly-shallying because I’m in a crummy mood.


No, I agree with you that there’d be a real benefit to having a TADS 3 in-browser interpreter. The IF ecosystem needs at least two latest-gen languages available at a time; one of the reasons I’m not bothered that some people find I7 syntax alien is that there is a great, traditional-style alternative out there for them to use.

I’m not in a position to do anything about it myself, unhappily.

You could write a teaser in z5 and the full game in T3?..

Just to take a step back a minute, I don’t think the lack of a T3 browser interpreter is especially dire (though like most people probably I’m fully in support of it, etc.). There are many examples in the independent game scene where game makers don’t use browser-based platforms and people download their games.

Admittedly those games have two big advantages – screenshots, and gameplay videos. I know there’ve been some attempts by publishers to make trailers for books and put them on youtube…usually these are kind of dumb IMO, but that’s no reason not to get creative with marketing. Take Aaron Reed’s Blueful prelude to Blue Lacuna, for example. From what I’ve gathered Blueful attracted many more casual players than usual – and as we know, you couldn’t easily play Blue Lacuna in a browser when he released it.

That’s a great suggestion. Possibly I’m being too gloomy about this whole thing.

On the other hand, when people download a graphic game, that’s one piece of software. It’s not an interpreter and a separate game file. Plus, I think there may be a widespread understanding that graphics on the internet tend to be slow, so wanting a local executable program is natural.

If I were a real programmer, I could do the work myself. But I’m strictly a hobbyist programmer – mainly I’m a writer. So I’m trying to beat the drums here.


I think a lot depends on how casual a player you’re trying to net. There are definitely people who just want to play something online, period – no downloading. (I am one of those people when I’m looking to play something on a work machine during my lunch break, say.)

There are also people who are willing to download, but prefer the process to be pretty smooth, or will only download things that they’re pretty sure they’ll enjoy.

For IF that I was trying to get to an audience outside the community, I’ve generally offered a zip file bundling the interpreter and the game. That way, they’re downloading two things, but it’s one click, so it doesn’t feel like such a big deal. I think this works tolerably well, but is still inferior to having stuff online.

I’m guessing that people who really want to play something only online are also looking for shorter play experiences, while those who might be receptive to a multi-hour game are also more likely to be willing to download something. So I think the most dramatic gains in playership from posting online are likely to apply to comp-sized or smaller works.

However. None of my speculation is backed up by really hard market research.

Something that might be: when John Bardinelli talked to us at PAX East about the Jay Is Games playership, he suggested that short, episodic works available online would have the greatest uptake from the JIG readership – something people could get into, and come back to over the course of months, but where each individual game would be small to play.

Both MJR and DaveC have plans that would bring TADS to the web, but they would both use CGI servers. I’ve considered writing a TADS3 VM in Javascript, but it’s far beyond me, and I don’t really have the time. The TADS3 VM is very complicated, and there is currently only one implementation of it.

Doesn’t T3 let you bundle your game and terp into one .exe already? If you market your game like that people won’t even realise how it normally works.

And if the lack of an IDE is the main problem with I6… well I kind of just wanna say get over it. I mean that nicely. However there are syntax highlighters for I6 for a number of editors etc…

I6 has a decent IDE, but the name is escaping me at the moment. I watched someone here write their PAX Boston speed-IF using it. It has an object browser and syntax highlighting, I’m not sure about compiling. I’ll have to ask again what it was, but here are some possibilities from the archive at ifarchive.plover.net/indexes/if- … itors.html:

ifarchive.plover.net/if-archive/ … te1500.zip

ifarchive.plover.net/if-archive/ … fide06.zip

ifarchive.plover.net/if-archive/ … p13Win.zip

Wide, perhaps?

The TADS 3 IDE is more than decent, though; it borders on professional. (It’s probably terrifying to newbies the first time they run it, too. :smiling_imp: ) But once you learn to use it, the debugging tools it provides are invaluable. When your code isn’t working and you have no idea why, it’s so convenient to set a breakpoint and step through the code line-by-line until you find your mistake. Wide looks like a nice IDE, but it doesn’t offer anything like the TADS Workbench’s debugging tools.

(To be fair, working with the huge adv3 library does require better debugging tools than an Inform game might.)

Yes, the .exe is a good solution – for Windows users. But even there, some people prefer not to run .exe’s from unknown vendors. And Mac and Linux users are out of the picture.

The absence of a nice IDE is only one of the problems with I6. Overall, it’s an old-fashioned language. I’ve written two long games with it (one of them 10 years ago, admittedly … nothing recent). In principle it will do anything that I7 will do, that’s obvious, but it lacks many of the powerful coding features of T3, such as the large class library and the multi-stage action checking.

I do understand that the T3 VM is probably far too complex for a Javascript implementation. The idea of a VM running on a server is surely a lot more practical. Even aside from the speed issues, the source code is already in C, so the job of creating the terp would surely be much, much easier. But I know nothing at all about PHP. The whole thing is way beyond me – I’m a good writer, but strictly a hobbyist programmer.

I’m a hobbyist too, but practically speaking (to the general community here), could you run QTads on a server and take over the I/O, such that you could take input from a web page, send it to the interpreter, then print the output back on the web page? This probably wouldn’t be a scalable or fast way to handle things, but it could work I think. I believe there’s even software that will handle the I/O part for you in relation to the interpreter (that is, this software acts like a human user typing into the interpreter on a desktop, but with input you provide).

You would need to write some javascript to display the text on the web page and get input, but that’s pretty simple actually.

However I’m probably missing something major here.

edit: I suppose you’d also need a way to send the input to the mediating software on the server, but I don’t think that would be complicated.

Based on my extremely limited understanding of this technology, I think the ingredient you’re missing is that the program running on the server has to be able to manage multiple players at once, each playing a separate game (or, indeed, a different game entirely). Also, cookies for saved games have to be sent back and forth. It’s not simple stuff.


I love TADS 3 for its conversation system, for the conciseness of its code and for the intelligence of its parser. Inform 7 is antithetical to the way I work in so many ways, but I keep coming back to it. I’ve started two games in I7, before switching back to T3. Because I would love to release a browser game. I see it in my own playing habits - clicking a link to play a game is so much smoother than clicking a link to save a zip file, then find it, extract it, double-click…

So yes, this is an issue for me too. But, as Jim said, there’s nothing stopping me from using systems other than T3 - I’ve already got the germ of a keyword-style game implemented in Flash. It’s just a shame to have to reinvent the wheel.

Last night I was porting (basically, hand-copying) some material from an I7 version of a project into the T3 version. It’s time-consuming and error-prone. I was trying to do the game in I7, but I was getting a little tired of declaring global variables with long names…

Here’s a question: Would people be willing to contribute a few dollars (or more than a few) to a pool to be awarded to the first person (or team) that creates a fully viable, reasonably bug-free T3 player for the Web? Would that be enough to provoke the interest of a real programmer? How much would it take?

I don’t mean paying a competitive wage for the work. There’s no way we could raise that kind of money. But maybe we could raise enough to help the person feel appreciated.


I’m not really sure I believe that. Reading through the T3 VM documentation, it’s not that complex, as these things go.

Of course, the real question would be whether such a beast would run at an acceptable speed or not, and probably the only really good way to check that is to try it and see. On the other hand, I didn’t really think Javascript was fast enough for a Z-machine implementation, but Thomas Thurman proved that wrong with Gnusto (which is the engine behind Parchment). Modern Javascript implementations are getting faster very quickly, so it could well be feasible to write a T3 VM in Javascript and wait until browsers can run it quickly enough.

Once you’ve done all that, though, you still have to implement some sort of display model. You’d have that problem with the client-server way of doing things, too, though.

Personally I’d much prefer to see a Javascript T3 VM than a client-server solution: the former lets you just knock up a web page with a running game so easily. Of course, it’s not like I’m volunteering to do any of the work :frowning:

I’d guess that, aside from the security issues, a lot of casual players would just rather play on the web than to download. This is certainly true of me, though I use a Mac anyway. But it does seem as though the browser games on JayIsGames get a lot more comments than the downloads.

(Of course, if you’re releasing a bundled .exe, you could also release the .t3 separately for Mac and Linux users to run in their interpreters. Though releases that say “If you’re using Windows, do this, and if you’re using Mac, do this extremely complicated thing” may be almost as offputting to the casual user as downloads that are windows-only.)

I can help in the “*.exe bundle for Macs” issue. I could modify QTads so that it loads the first Tads game it finds from a specific directory inside the application bundle. This wouldn’t even require installation, just downloading the *.dmg and running it.

I have to say though that even if I think that web-based interpreters are “cool” for what they provide and also eagerly await news from Mike Roberts about this, introducing casual, non IF-aware players to the medium through a web-browser can backfire: “browser-based games suck!” That’s a phrase I had to hear often when showing others some web game I discovered (be it Open Arena or Tribal Wars.) “Browser-based” is a term that for many implies some form of inferiority (or more widely known as “suckage”, depending on your target audience.)

Jim, I’d be in for 50 USD. Remember Greg B. proposed a similar offer for the T3 Mac OS interpreter, and eventually someone announced CocoaTADs – I think the developer mentioned Greg’s original thread, so perhaps it was some motivation? In any case, there’s little chance an experienced programmer would be adequately compensated by a pool of contributions, but maybe it would be the spark that would get someone going on it.

One of the problems right now is that there’s a bit of a negative feedback loop with the visibility of T3 and the number of capable people who might happen upon such an opportunity and run with it.