You are viewing the community [info]tads3

TADS 3 System Development

Recent Entries

TADS 3 System Development

View

Navigation

December 22nd, 2011

TADS 3.1 now available

Add to Memories Share
I'm pleased to announce that the long-delayed TADS 3.1 is finally available.  This is a fairly major upgrade; it has two major new feature areas, a raft of little language enhancements, and many bug fixes.  The Windows and source code packages can be downloaded from tads.org immediately.  (The code has already been ported to Unix and Mac OS, but those still need to be finalized and packaged.)

For full details on the changes, see (as usual) the change history - that's available on tads.org on the Manuals page, along with the current documentation.

The first major new feature area is Web play.  It's now possible to design a game for deployment on the Web, so that players can run it in a Web browser without installing any TADS software on their machines.  The game and the TADS interpreter run on an Internet server, and the game presents its user interface as essentially an HTML page.  The game itself acts as a Web server, serving the HTML/JavaScript/CSS resources that make up its UI.

It's not quite TADS's answer to Parchment: for one thing it doesn't give existing games instant net deployment, since the game has to be built specially for this mode; for another, the .t3 program actually runs on the server and communicates with the browser via AJAX, rather than running entirely inside the browser as javascript the way Parchment does.  This second point has some pluses and minuses; the main drawback is that it requires a continuous connection with the server, so you can't play disconnected with a browser.  (You actually can play such games disconnected if you install the TADS interpreter on your client machine, since that lets the whole client/server setup run locally without the need for any network connection.)

But there are also some serious pluses.  The big one is that TADS now has a true network infrastructure.  The obvious possibility this opens up is multi-user play, for building MUDs or multi-PC games.  Now, this is just a possibility at this point, since there's no library support for any of that, but the network plumbing is in place to support it.  I see a few other possibilities that are also pretty interesting.  One is collaborative play - which is more than a possibility, actually, in that the updated Adv3 supports it out of the box.  Collaborative play means that multiple people can simultaneously connect to a session - still playing a single-player game, but with each player able to see what the other players see and able to enter commands.  The same idea as a couple people huddling around a computer playing together, but remotely via the Internet.  Another idea I'd like to explore at some point is using the networking to let the author be involved while people are playing - either directly involved in the sense of actively manipulating the game in response to what the player is trying, or more simply, just gathering ongoing information on where players got stuck, verbs that didn't work, etc., that could go into improving the game in a rapid update cycle.  Same idea as beta testing, but continuously after release, and without people having to manually gather logs and send them to the author.  I also have this back-of-the-mind idea of using the network as a real-time human supplement to the parser, where commands that aren't recognized by the mechanical parser could be instantly flashed to a network of people who could step in and interpret the commands into something recognizable to the parser, and send it back, so that from the player's perspective the parser seems to understand whatever a human could.

The second big new feature area is dynamic compilation, and a bunch of related improvements in the reflection system.  This pushes TADS pretty fully into dynamic language territory.  So far it's not something that Adv3 uses at all, but I added it because I have a bunch of library facilities in mind that could take advantage of it.  Adv3 or, more likely, the "Mercury" library I've mentioned will probably start taking advantage of it in the next round, and in the meantime, I think it opens up a lot of new possibilities for add-on libraries.

February 19th, 2011

QTads 2.1.1 has been released

Add to Memories Share
Version 2.1.1 of QTads, a Multimedia/HTML TADS interpreter for Linux, Mac, Windows and other platforms, is now available for download:

http://qtads.sourceforge.net

This version provides new features as well as bug fixes. Changes since 2.1:
  • When the interpreter needs to scale an image, it can now use bilinear filtering. This results in smoother images (without filtering, scaled images can appear pixelated or have other scaling artifacts). However, the configuration dialog provides an option to disable filtering, since it also makes scaled images appear less sharp. Example:

    Scaling filter enabledScaling filter disabled
    Scaling with filteringScaling filter disabled

  • The "Game Information" metadata viewer now supports and displays cover art images (as specified by the Treaty of Babel.) Also, the list of recognized names and values (like "Genre", "Headline", "Forgiveness", etc) should now be complete:


  • The list of recently played games now behaves a bit smarter; it will use the actual name from the game's meta data (if available) rather than the path/filename, and will also try to avoid duplicate entries (which can happen when symbolic links are used in the path and/or filename.)

  • Fixed a bug that resulted in games using the wrong font in some places. "Six Stories" is one example; it would previously use a wrong font for input, titles and statusbar.

  • It is now possible to use the main game font as input font through a new option found in the configuration dialog.

  • The file I/O safety level feature of the VM is now configurable through the configuration dialog.

  • The interpreter now correctly responds to game queries about whether graphics, audio and hyperlinks are currently enabled or disabled. Previously, the interpreter would always report that these features are enabled, making it impossible for games to adapt their behavior.

  • Fades and crossfades are now correctly advertised as being supported. Previously, the interpreter wrongly responded with "not supported" when a game was querying about it.

  • Fixed a rare crash that occurred while entering non-latin characters.

February 16th, 2011

HTML TADS on Android Devices

Add to Memories Share
Today I was experimenting with the Android NDK and the recently started android-lighthouse project. I never did mobile development before, mostly because I don't even own a "smart" phone; I guess I don't need my phone to be smart, I just need it to make phone calls :-P But it turns out that developing for mobile targets ain't that alien.

So after about 6-7 hours of figuring out how stuff works, I got TADS 2 to run on Android. Graphics, hyperlinks and colors work OK. The only thing missing is sound/music support. But it should be doable since the SDL library, which QTads uses for sound, has been ported to Android. Screenshot:

Screenshot of TADS 2 running in Android emulator

TADS 3 crashes for some reason and I've no idea yet how to debug on Android.

The port is extremely crude at this moment and not something that can be released. Also, android-lighthouse is in a state of flux and it's not clear yet how to deploy applications. The only sure thing is that it won't require people to root or jailbreak their devices.

Hopefully I'll be able to provide a package for this soon. Don't cross your fingers about it happening this month though.

February 2nd, 2011

QTads 2.1 has been released

Add to Memories Share
I've just released version 2.1 of QTads, a Multimedia/HTML TADS interpreter for Linux, Mac, Windows and other platforms. There were quite a few enhancements and important fixes to warrant a minor version bump.

You can grab it from:

http://qtads.sourceforge.net

Changes since 2.0.2:
  • Page-pauses (aka "MORE" prompts) are now occurring when the game displays more content that will fit in the window.

  • Banners can now have borders. Note that borders are controlled by the game; it's not a feature that can be switched on or off by the player.

  • Banners now correctly take margins into account when calculating sizes. This fixes the banner at the bottom in "Walker & Silhouette" for example.

  • The interpreter will no longer allow scrolling in banners unless the game allows it.

  • Text rendering is now faster and performs less drawing operations.

  • The interpreter is now able to perform on online check for new versions through the "Help->Check for Updates" menu item.

  • Some GUI elements were changed to better comply with various "Human Interface Guidelines" on several platforms. This includes changes in the menus as well as using sheets for some dialogs on Mac OS X.

  • On the Mac, running a game by dropping its file on the QTads icon is now supported.

  • When the VM requests input from the player, the maximum allowed length of input is now taken into account. Previously, the interpreter would allow input to be much longer than what the VM accepts and the extra characters were simply truncated.

  • The last entered directory for the "Open New Game" dialog is now remembered between sessions.

  • Various minor bugfixes and enhancements not worth mentioning here.

January 14th, 2011

QTads 2.0.2 has been released

Add to Memories Share
This is mainly a bugfix release, correcting a number of bugs in the previous version. As always, you can download the Linux, Mac and Windows versions as well as the source code, from:

http://qtads.sourceforge.net

Changes since 2.0.1:
  • In games that use background images, there was a visual glitch in the part of the background image near the vertical scrollbar. This has been fixed.

  • You can now drag&drop TADS game files into the application window to load them into the interpreter.

  • Clicking on a banner window no longer results in not being able to compose accented characters (or other characters requiring "dead keys".)

  • Text grid banners should now have the correct foreground/background color (light gray/black) when a game doesn't explicitly set them.

  • Games are now able again to display dialog windows with buttons.

  • A crash at exit that occured on some systems after running games that play MIDI music has been fixed.

December 19th, 2010

Corrected Mac OS X builds of QTads 2.0.1

Add to Memories Share
The Mac version of QTads 2.0.1 (both for Intel as well as for PowerPC) had an annoying issue: at some point during a game, the transcript would get stuck and new text would not be visible anymore. This is due to a faulty version of one of the base libraries used by QTads.

I've rebuilt the interpreter using a version of that library that does not exhibit the problem:

Download for Intel Macs (OS X 10.5 and higher)
Download for PowerPC Macs (OS X 10.5 and higher)

Note that this was a Mac-specific problem; if you're not using the Mac version of the interpreter, then you're not affected.

October 10th, 2010

QTads 2.0.1 has been released

Add to Memories Share
I've just released QTads 2.0.1; mainly a bug-fix release. Thanks to everyone for reporting them! Downloads for Linux, Mac, Windows, as well as the full source code can be found at:

http://qtads.sourceforge.net/downloads.shtml

The main reason a Windows version is offered is so that authors can test their works with it if they wish. If something seems to work differently compared to HTML TADS, consider it a bug; and if possible, please send me a bug report about it.

Changes since 2.0.0:

  • A new "Restart Current Game" menu option has been added.

  • Digital sound fade-in, fade-out and cross-fades are now fully supported on all operating systems. I think...

  • MP3 and WAV sounds that use "odd" sampling rates should now play correctly. Previously, they sometimes were playing at double speed.

  • Input of non-ASCII characters for languages that use compose keys ("dead keys") should now work correctly for TADS 3.

  • A memory leak during unloading of MP3 and WAV sounds has been fixed.

  • Decoding of long MP3s on Windows should not take several millenia anymore.

  • A new configuration option was introduced that allows for selecting the character set encoding to be used when playing TADS 2 games. Previously, the interpreter was treating TADS 2 games the same as TADS 3 ones, which wouldn't work correctly with games that use characters outside the ASCII range.

  • When built on Linux with Qt 4.6 or newer, appropriate icons from the desktop environment's current theme will be used for the various menu items.

  • A sane set of default fonts and sizes is now used on Mac and Windows.

  • Sometimes the interpreter would not scroll down to the bottom when opening TADS 2 games. This should no longer be occuring.

September 28th, 2010

QTads 2 has been released

Add to Memories Share
Not sure if there will be any TADS games in the upcoming IF Comp, but better safe than sorry... So I finally released QTads 2. If it can handle Space Shooter, then I guess it handle everything, right? :)

If you don't know what QTads actually is (neatly copy and pasted from my R*IF announcement):

It's a cross-platform, multimedia interpreter for TADS games. It runs in Linux, Mac OS X (10.5+), MS Windows (with a few problems) and Haiku (though binaries are not yet provided for Haiku). It probably runs on many more, as long as the Qt and SDL libraries are available.

QTads version 2, the first to include Multimedia TADS support, was in development for seven months (though with big pauses in-between), and is now finally out. You can find binaries as well as the source code at:

http://qtads.sourceforge.net/downloads.shtml

Some stuff had to go during the rewrite of major parts of the code. This was necessary in order to decrease the initial porting effort and to release something that works within a reasonable time frame. I'm hoping to bring everything back bit by bit as development progresses.

July 17th, 2010

IF UI Concepts

Add to Memories Share

After reading a recent thread in the intfiction forum, which was a spinoff from an active discussion in Emily Short's blog, I'm thinking about ways to make the IF UI more ... uh, modern.

HTML TADS provides some nice tools with which to approach this goal. I don't think the feature set is anywhere near complete, but thinks like banners and clickable hyperlinks are clearly a good start.

The problem, of course, is that the player needs an HTML TADS interpreter. Windows users can download a game as a .exe, so no interpreter is needed. Mac users have to download and install an extra component (CocoaTADS), which is less desirable simply because they're not all going to be willing to do it.

So one question that pops into my beebee-sized brain is, might we be able to hope that someday Workbench will be able to compile a game to a native OS X app?

Another question is, are there features that could usefully be added to HTML TADS in order to create a UI that was, in some way, less command-prompt-centric? I'm not sure what those features might be; it's an open-ended question.

I'm not talking about point-and-click graphic adventures. I'm a text guy. What I'm musing about are ways to make the experience of a text game easier and more inviting. Clickable words in a room description are one example; I'm sure there are others that I haven't thought of.

--JA


May 27th, 2010

Network services, part 3

Add to Memories Share

This time I'm getting into some inner details of the networking layer, so my usual disclaimer: to write a game you won't have to know how any of this works.  This is mostly for those interested in how this all works on the inside.

As I've been explaining, the http server that's feeding HTML/XML to the player's browser is part of the game itself, not an external Apache server or anything like that.  This is important because it means that a game's process lifecycle is the same as what we're accustomed to with writing conventional TADS games: the game and all its objects stay in memory throughout the game session.  Meaning that as an author you don't have to overhaul your whole programming approach to fit the transactional programming model more typical of web servers, where nothing stays in memory between requests.

But if you're already familiar with that web model, this raises a bootstrapping question.  If you're thinking of regular web programming, and you're hearing me say the game is an http server, you're probably imagining that our server machine will need to have a bunch of "t3run mygame.t3" processes started up at boot time, idly waiting for people to connect.  That's basically the way a normal web server runs - you set up an Apache daemon (httpd)  to launch at boot time, bind to port 80, and start listening for connections.  If the game is a web server, does this mean that it has to start at boot time and bind to port 80?  And if so, what happens if two people want to play at the same time?  Do we need one game on port 80, another on port 81, etc?  Obviously the answer had better be no, and it is.

In fact, there is no "t3rund" that runs continuously or gets launched at boot time.  Instead, t3run processes are spun up on demand.  For a stand-alone configuration, where everything runs on the player's PC (just like a conventional TADS game today), the technical details are pretty simple:

- the player double-clicks mygame.t3 on the desktop
- the OS launches "t3run mygame.t3"
- t3run loads mygame.t3
- mygame.t3 does the 'srv = new HTTPServer' setup work
- mygame.t3 calls connectWebUI(srv)
- conectWebUI opens the local browser and navigates to the game server
- the game server returns the initial HTML page for the game

The magic function is connectWebUI().  This is another net built-in, whose function is to connect the newly launched game server with the user interface.  This function is the key abstraction in making stand-alone vs Web play seamless to the game (and the game programmer).  The interpreter knows how the user is connecting, based on how the interpreter was invoked (and based on its capabilities - HTML TADS will continue to be for local play only, for example).  When the interpreter is invoked in stand-alone mode, which is the case when it's invoked from the desktop shell by a .t3 file double-click, it knows that "connect to the UI" means to open a browser window locally and connect it to the game's http server.  And remember that when I say "browser window" here, I really mean a customized TADS application frame with an HTML widget inside.  Although on some systems it might really be just a simple browser invocation - either way works; it's just a matter of how seamless it looks.

So from the user's perspective, they double-click a .t3 file, and a game window appears on the desktop.  Exactly like running a conventional game with the current system.

In the Web play configuration, everything is exactly the same from the game's perspective, but of course the user's experience is a little different, as is the underlying implementation.  Even in the Web play configuration, t3run is spun up on demand, so the question is, how do we demand it?  Clearly we need some kind of web server running.  I keep saying there's no Apache involved, but that's not entirely true; it is true that we don't need Apache involved once t3run is launched, but we do need some kind of conventional web server to do the launch in the first place.  So on a machine that hosts t3run, we'll need to set up a regular web server, and install a couple of php scripts alongside the t3run executable.  These scripts will be part of the TADS release, and shouldn't need per-system customization.  Web server installation should thus be very straightforward; it'll probably amount to some file copies and a little .htaccess editing.  What these scripts do is handle an HTTP request that's directed to the "launch t3run" URL on the server, by launching a t3run process instance, communicating with the new process to get its TCP port, and replying to the HTTP request with a redirect to the newly established t3run server.  The sequence of events is like so:

- the game's author puts a hyperlink on her home page
- the player finds the game page and clicks on the hyperlink
- the browser navigates to the web page in the link
- the Apache runs the t3run launcher php script
- t3run starts up and loads the game .t3
- the .t3 program does the 'new HTTPServer()' stuff
- the .t3 calls connectWebUI(srv)
- connectWebUI communicates the port info back to the php script
- the php script sends a '301' redirect reply with the t3run server URL
- the browser navigates to the redirect URL
- the game server returns the initial HTML page for the game

Note that the first step, where you put a link on your home page, will probably be the only thing you need to "install" as an author.  That link will probably point to a generic, shared t3run server on some other machine (as we got into in the comment discussion for my previous post "Network services part 2").  So you probably won't need to host your own t3run server, although you'll certainly be able to if you have a hosting plan that's capable of it.

From the game's perspective, there's absolutely no difference between this and the local configuration - the game creates an HTTPServer object and connects it to the UI via connectWebUI().  From the player's perspective, it's also extremely simple: click on a link, the game comes up in the browser.   From the server's perspective, configuration is easy (just some packaged php scripts to install); t3run instances are created on demand, and bind to OS-assigned random ports, so the server machine can run as many simultaneous game sessions as its CPU and memory will permit.  TADS games tend to be pretty light on CPU averaged over time - the sense-path stuff can make them gorge on cycles in brief bursts, but overall they spend most of their time waiting for user input.  The limiting factor for scaling is probably memory; I'd guess TADS 3 games are mid-sized in web app terms.  I expect a minimal 128 MB VPS could easily handle 10-15 simultaneous sessions for a good-sized game.  I think I'm being conservative with that estimate; we'll see when I get a little further along with the implementation.


Powered by LiveJournal.com