Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TADS' WebUI #7

Open
my2iu opened this issue Nov 11, 2018 · 0 comments
Open

Add support for TADS' WebUI #7

my2iu opened this issue Nov 11, 2018 · 0 comments

Comments

@my2iu
Copy link
Owner

my2iu commented Nov 11, 2018

This looks more difficult than I was thinking it might be.

It looks like I could maybe rewrite the networking code and UI code to actually work in a browser. The problem is that it seems that all the UI code might actually be embedded directly in the TADS game files themselves, not the interpreter. So it's not actually possible to change the UI code.

Even then, it might be possible to use service workers to actually serve the UI code from the game files to the browser. The TADS interpreter would run the game file in the service worker, allowing it to act as a network server/proxy. You could only play one game at a time probably (not have multiple instances in multiple windows), but I think it could work.

The problem is that the default UI code actually uses absolute file paths in the URL. As a result, the service worker would need to act as a proxy for an entire host to run the game file properly. Alternately, it could rewrite the UI code before it sends it to the browser, but that would require custom HTML parsing code. So then, the interpreter would not only need its own web server, it would needs its own web parser/browser as well to do a rewriting, which is starting to get mad crazy.

Since I doubt anyone wrote an alternative WebUI, it might be possible to just ignore the UI code in the TADS3 game files, and just serve a different UI (this would be just like the original option), but then you lose the ability to extend the UI in game files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant