Is there a Javascript Interpreter for TADS that I can run on my website?

0 votes
277 views
asked Jun 16 in Publishing by Paul_Erdos (39 points)

I have a website, and I want people to be able to play my adventure from my webpage. Is there source code available for a javascript TADS that I could run on my website? I know IFDB has a "play online" web interpreter, but idk what it is / where it is / how I would use it with my website

1 Answer

+3 votes
answered Aug 3 by Emerald (46 points)
selected Sep 7 by Paul_Erdos
 
Best answer

There aren't Javascript interpreters for TADS in the same way as there are for Inform games. You can play TADS 3 games in a browser, but they run on a server, so setting it up is a bit more complicated than just uploading some files to your website.

To begin with, you'll need to compile your TADS 3 game with the WebUI version of the library you're using. If you've already started writing the game with the standard UI version of the library, that's fine. The easiest way to switch is to start a new project using the WebUI version of the library, and then add your existing source code files to the new project. If you want to, you can then compile from both of the projects to get both a web version and a download version of the game. If you want to see how this works, you can look at the source code of my game It (http://ifdb.tads.org/viewgame?id=clox1mlffo37xf2z) which includes both standard UI and WebUI project files.

To use the IFDB online play feature, you just need to create an IFDB page for your game. In the Downloads section of the page, add a link to the WebUI version of your game, wherever it happens to be online (e.g. the IF Archive, your website) and select "TADS 3 Web" as the File Type. IFDB will automatically generate a Play Online button for the game. You can then link from your website to the IFDB Play Online page for your game.

One problem with this is that the link will go through IFDB first and invite players to log in before playing, so they can save their progress on the IFDB server. You don't have to log in to play the game, but it's still not very friendly to casual players. Plus, you may not want to create an IFDB page immediately, for instance if you just want to share the game with a few beta testers at first.

If you'd rather provide a way that people can jump straight into your game, you can use the gs.tads.io server instead of the IFDB. You just create a link to http://gs.tads.io/?storyfile=[url_of_your_game]. For instance, you can play It at http://gs.tads.io/?storyfile=http://boeghe.im/dl/it_web2.2.t3.

commented Sep 7 by Paul_Erdos (39 points)
edited Sep 7 by Paul_Erdos
Hi! I asked this quite awhile ago, apologies. Anyways, let's say I'm using Github as my web hosting, and I can make use of Javascript, but not database things like AJAX or SQL. Is there a way to do this statically?

Edit: Having now tried the gs.tads.io interpreter, I think it's more than enough to do what I want, and I presume I can host my own files, too, so that's good (if it's the case). It's also the only alternative, which is a strong selling point.

Thanks!

Edited Edit: I just tried to host my story's *.t3 file on my own and run it through gs.tads.io, and it worked like a charm.  yaaaaaaasssss
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...