JavaScript, browsers, and interactivity

:+1:

Nothing beats the browser’s rendering capabilities for text, images and flexible layouts. JavaScript works across all browsers on all devices (code once). This should be the foundation for all future IF engines.

7 Likes

Er…no? There’s certainly a difference since cross-compilation front loads that complexity onto the author, rather than making providing games for different platforms painless. Does the average IF author want to deal with compiling separate binaries for each platform? No, probably not.

It’s a trivial process if you get past the nontrivial hurdle of setting up VMs or actually physical machines for each environment, notwithstanding the complications coming from the specifics of that (e.g. how old of a Windows/OSX version are you going to support, what libc are you using on Linux, etc). Even if this was as smooth as possible, adding support for a new platform would be a nightmare. But you don’t need to do that to provide a story file, all that complexity turns to interpreter writers.

Aren’t TADS 3 lists limited to 13094 entries before they start causing runtime errors? I guess you can say that’s a limit that isn’t likely to be run into in practice, but I suppose that still seems a strange choice for a limit.
EDIT:

Except Lynx, or people using NoScript, etc.

But (barring those cases) does all JS work across all browsers? :smiling_imp:

Regarding the cross-platform compilation thing, I’m surprised no one has mentioned that modern game engines (e.g. Godot) make it pretty easy to create builds for multiple platforms without requiring VMs. I develop on Linux, but most of my games on Itch also have a windows build, and occasionally also Mac if I’m not too lazy (not that it’s much extra work. Literally just a matter of clicking through a couple menus).

4 Likes

JavaScript functionality is up to the browser. All browsers (that are worth a damn) support JavaScript fully. Everything interactive in browsers online runs with JavaScript: banking, social media, this forum… even Twine! :crazy_face:

2 Likes

I’m not aware of this… TADS3 also provides Vector which is meant to be used for more dynamic list-like operations.

1 Like

If someone isn’t willing to turn off NoScript to play a particular work, I’m very doubtful they’re willing to run a native executable, either.

(Lynx is fair.)

6 Likes

I feel like I vaguely remember that now, although I didn’t know where to look it up in the System Manual. TADS3 Vectors hold about 65,000 elements…

1 Like

Oh yeah, to be clear, I’m arguing because I thought that was the purpose of this thread (to present controversial takes and defend them), not because I want to discourage experimentation. Reinventing the wheel is how we get better wheels!

2 Likes

Nothing beats the browser’s rendering capabilities for text, images and flexible layouts. JavaScript works across all browsers on all devices (code once). This should be the foundation for all future IF engines.

I’d like to also add that the amount of documentation out there for JavaScript is ludicrous.

2 Likes

While I want a C++ IF engine, I also want a C++ to zcode or glulxe compiler. And while I’m fine compiling my own C++ code with G++ to run on my own Linux box and could even handle using a Raspberry Pi to compile for ARM Linux, I have no idea how to compile for Windows or OSX, and if there’s no install.sh or a .deb, I’m kind of at a lost getting anything not available via apt running as far as native Linux software goes… And while I’ve never tired, I’m pretty sure Orca can’t talk to stuff running in Wine and I’m not sure NVDA would work with Wine or that Orca and NVDA would play nice.

2 Likes

Not all web browsers support JavaScript and some have only partial support. This is one reason I’ve never been able to find a usable terminal web browser and ditch the GUI entirely. JavaScript is also one of the first things to get crossed off functionality lists when talking lightweight GUI web browsers.

Also, I hate JavaScript from an end user perspective and miss the days when I could get away with having it disabled most of the time, so I’m against anything that means even more stuff is using it.

3 Likes

Whoops, I am only here to present hot takes. I have no intention of defending them :laughing:

7 Likes

I definitely did not know about TADS text director, lambda, lists, and Doers capabilities so that’s interesting.

One of the things I know will be a leap forward is unit testing a story. Not sure any existing platform does that effectively.

2 Likes

Pretty sure @jbg does unit testing with TADS 3.

3 Likes

this is exciting,I did not know this :eyes: are integration tests possible too?

2 Likes

Possibly. I’ll let jbg explain any specifics, though~ :grin:

1 Like

Name them please. Currently, 99% of browsers (by actual daily usage) support JavaScript.

1 Like

The term used for clean website design (using tags and not styling things) is called brutalist design. Some designers do use colour attributes, but beyond that, minimalist to the bone.

Edit: This is a good take on brutalist design theory and execution.
https://brutalist-web.design/

2 Likes

I can’t speak to actual user counts, but there are a lot of websites out there that only work properly in the big three and their closest derivatives, only work properly in one or two of the big 3, or which might work in more browsers, but you’re barred from even trying unless you’re using one of the browsers the website approves of, and even then, you might be barred if you aren’t running the exact version the website wants you to run. And best I can tell, most of the time, such websites make use of rich web features because eye candy or the web designer is showing off and never learned the kiss principle, not because they actually make the website better.

If none major browsers have microscopic user counts, it’s probably because much of the web is actively hostile to anything that doesn’t support all the pointless bells and whistles and even if you don’t like the major browser you’re using, finding something that won’t break at least one website you use regularly is a tall order. It’s like if the majority of restaurants forced you to buy a soda with every meal and refused you service if you just want a glass of water with your meal and most people give you funny looks if you talk about the health risks of excessive caffeine and sugar consumption.

Thank Turing Orca has gotten better at handling badly behaved JavaScript, because it’s only gotten harder to avoid as time goes on.

3 Likes

I’m not sure I understand what you are getting at.

JavaScript (JS) allows webpage content to be manipulated on the fly. That’s all we really need to acknowledge about it. There isn’t anything less or more required of JS when presenting a Discourse forum website (aside from server calls) or a Twine game. Both use basically the same JS functionality under the hood.

There are many JavaScript engines in the many different browsers out there. However, at their core, they all strive to adhere to ECMAScript specifications… which is JavaScript.

JavaScript Technologies Overview

Anyway, I feel that JavaScript is synonymous to interactivity in webpages. It’s unfortunate that the world is sold on complicating things with bells and whistles (and advertising), but JavaScript is required to make interactive (beyond static) webpages. What a web developer does with JavaScript is the contentious part, not the technology itself.

For example, I may want to hide or show a piece of content in a Twine game. That same functionality is also used to show pop-up ads all over a webpage. What do we do about that?

1 Like