my2iu / TADS2-html5

Port of the TADS 2 interpreter for HTML5
Other
5 stars 1 forks source link

Works great! #1

Closed agwells closed 6 years ago

agwells commented 6 years ago

Hi,

I found this project last week, and I just wanted to say that it's brilliant! :) I used it to play "The Legend Lives!" and "The Horror of Rylvania" all the way through, on Android Chrome on my not-very-powerful Android 5 phone. The only issues I noticed were:

  1. Slow startup time, which I can see you're already aware of, from the git logs. And of course there's not a whole lot that can be done about that.

  2. Can't load the same save-game file twice in a row. That is, if I load "game5.sav", then play a few turns, then decide I want to go back to that savepoint, so I try to load "games5.sav" a second time. On the second time, nothing happens. It will work if I load a different save-game file first; e.g. load "game5.sav", then load "game7.sav", then load "game5.sav".

  3. Couldn't view the end-game text of Rylvania. I suspect this is a bug in handling the situation where a game auto-quits itself when you win. I could view the end-game text of "The Legend Lives!" just fine, though.

  4. Could not load "The Legend Lives!". The other games I tried (all the ones from adventions.zip) loaded fine, but "The Legend Lives!" caused a crash with the error message "RangeError: Maximum call stack size exceeded Traceback". I was eventually able to solve this by recompiling with optimization level "-O1".

My copy of the project, with the -O1 and a few other changes, is here: https://github.com/agwells/TADS2-html5 . The changes I've made are:

I don't know if any of those are particularly useful changes, but feel free to take a look at the commit list and use any of my changes if you think they're helpful.

Cheers! Aaron

my2iu commented 6 years ago

Awesome. I'll take a closer look at this stuff on the weekend. For point 3, I imagine the problem is that I buffer the output (so that I can parse the HTML in HTMLTADS), but I don't properly flush things if a game exits without asking for any user input. I'll dig into that later on.

agwells commented 6 years ago

Here are some help files for testing out the game-ending. It's a copy of Rylvania, and a save file from right before the ending. Just restore it and do inject me with needle to trigger the ending.

rylvania-ending.zip

I tested it out just now and it seems the difference between Rylvania and Legend Lives, is that Rylvania ends by quitting the interpreter (after displaying the victory text), while Legend Lives ends with a "Restore, Restart, Quit" prompt. So you're probably right about the cause.

my2iu commented 6 years ago

Actually, I'll have to put the project on hold for a while. The project requires SharedArrayBuffer support in web browsers, but all web browsers removed that feature yesterday due to the latest security scare. There is currently no timeline for when that SharedArrayBuffers support will be reenabled, so everything will have to wait until then.

agwells commented 6 years ago

Lol, well, I feel lucky I found it and got to replay all those Adventions games the week before Meltdown and Specter hit!

I'll go ahead and close this issue for now, and open a separate one to document the SharedArrayBuffer problem.

my2iu commented 5 years ago

I've adjusted the build scripts to generate WebAssembly instead of asm.js. That seems to fix 4 (asm.js has always been a little buggy), and makes 1 more bearable. I've also gone in and fixed 2 and 3.