Check out Makruk (Thai Chess), our featured variant for March, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Interactive diagrams. (Updated!) Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Mon, Mar 10 09:23 AM UTC in reply to William Wragg from 08:48 AM:

Well, basically these are all just workarounds for the fact that this website is badly broken. Normally, when you fetch a file through a URL, you will get the version that is actually on the server. Not something that whappened to be there weeks ago for a short time.

It is generally a bad idea to not fix problems where they truly are.

The need to keep all earlier versions around, and users having to know the version number of the latest version, all seem fatal disadvantages to me.

Plus that this would not solve it. If there are multiple Diagrams on the same page, which each contain a link to the .js file, the script mentioned with last Diagram on the page will prevail over all others. So a fix in the script, upping the version number, would not have any effect for someone placing a new Diagram using that new version number posted in the Comments as long as there are still Diagrams using the older version.

Even when this website would work properly, the above problem would exist between the use of betza.js and betzaNew.js (which actually is an implementation of your suggestion using two versions). The problem is that I cannot retire betza.js, (as I would like), because betzaNew.js is not fully backward compatible with it. (Of course I can never remove betza.js on the server without breaking hundreds of existing Diagrams, but I could just replace it by a copy of betzaNew.js to make it irrelevant which Diagram refers to which script.)

The main issue is that betzaNew.js scales the piece images to fill the specified square size. This is a superior method, as it allows using larger (and thus higher-resolution) raster images that the browser will then scale down. Which prevents resolution loss on zooming. Of course use of SVG pieces would automatically solve that problem too. In betza.js too-large piece images would simply be clipped. The problem, though, is that some of the piece sets are not designed for having square-filling images. Their size is the smallest rectangle containing the piece, which is different for the various glyphs. So using those with betzaNew.js would give a very crappy Diagram.

A work-around would be to make this scaling behavior subject to a parameter, rather than by the choice of script, like fill=1. But the problem is what to do for the default in that case, as none of the existing Diagrams now specify that parameter. To reproduce betza.js behavior you would need fill=0. But then to get the improved behavior Diagrams would have to specify that parameter, which I don't like at all. Again this goes against the principle of solving problems where they truly are, namely the irregularly sized piece sets.