T3 in a Browser

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.

–ja

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.

–JA

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.

Right now this might result in duplication of effort, considering that Mike announced a while ago his intentions to provide a web-based interpreter as part of TADS itself. On the other hand of course, more options are always nice to have.

Back to the original topic of this thread:

community.livejournal.com/tads3/4250.html

It seems TADS 3 is trying to take “online IF” pretty much to the same place it tries to take everything else too, to the extreme :slight_smile: (Dunno how else to describe an IF language that would allow you to write networking code in your game, if you so wish…) Hopefully all will work out on the end.

I suppose that means one could now actually even write a MUD in TADS. (Edit: well, when it’s ready, at least.)

Mike’s post maybe makes Jim’s funding pool less urgent (I’m not sure; I don’t get a sense of whether the thing is 3 months or 3 years from release…) but I wanted to mention that Kickstarter might be a good platform for this sort of thing. In my experiences with it, people are willing to donate more money than they would otherwise, because of the (very real) possibility that the funding goal won’t be met and they won’t have to pay. But then if the funding goal is in fact met, everybody is happy (the fundraiser for getting the money, the donators because they pledged the money a long time ago and have forgotten about it, but now they get something they wanted and feel good about contributing).

Longwinded way of saying: yes, browser-based TADS is much needed, and I’d be willing to contribute to a bounty, too, if we think that’ll help.

As RealNC/Nikos said, more options are good, especially because Jim is talking about a client-side interpreter (I think?) and the other one definitely is server-side.

Just for the record, it is somewhat possible to run TADS3 games in a browser in a client-server architecture. Solution which I’m running (only for testing purposes of my translation project) is composed of GlkOte, which is a javascript terminal for IF programmed to send input text with AJAX call to PHP script on Linux server, which in turn executes frobtads interpreter runing in plain mode. Script pipes batch of commands to load a game, execute one user command and saves the game again. Output of interpeter is parsed and returned to GlkOte.

As you can see, it is really not meant as a long term solution, because it is a dirty bag of hacks with several principial limitations. For example there is no support for menus, for single character input (just a complete line), no possibility for interactive games and so on.

There is another complication - because whenever game asks disambig questions, this state and ability to answer such question is not remembered in saved game. I was able to overcome this problem only by modification of adv3 to include special marks in output text for the frontend indicating, that it should repeat previous command. This means, that you must be able to recompile game for webplay.

So to sum up, the only positive of this solution is, that it is really easy to make. If someone is interested in more details, just drop me a line.

Support has been already implemented for the next version, but it has not been officially released yet.

See the following thread, starting at this post: Creating RIA Interpreter for TADS 3 - #10 by RealNC

You can try to get it running right now with the Git sources of FrobTADS (instructions on how to compile your game and how to run ‘frob’ are in the thread), but PHP-wise, you’d be on your own. When it is officially released, the plan is to have ready-made PHP scripts that will handle everything (most importantly multiple connections).

Ah, it is finally approaching. Sorry, I’ve missed that thread. Thank you for info, I’ve tested it and it looks promising.